# Class LittleGhost::Tools::WriteTodos

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/Tools/WriteTodos.html

WriteTodos lets an agent share a live plan with the application and the person
following its work. Add it like any other tool:

    class ResearchAgent < LittleGhost::Agent
      tools LittleGhost::Tools::WriteTodos
    end

Each execution replaces the full plan in RunContext state. Todo IDs remain
stable across updates, statuses are `pending`, `in_progress`, or `completed`,
and no more than one todo may be in progress. When no context is available,
the tool retains fallback state on its instance.

## Inheritance

`LittleGhost::Tools::WriteTodos < LittleGhost::Tool`

## Instance methods

<a id="method-i-call"></a>
### `#call`

```ruby
#call(input)
```

Replaces the stored plan after enforcing progress and ID invariants.

<a id="method-i-execute"></a>
### `#execute`

```ruby
#execute(input, context: nil)
```

Trims user-facing titles before normal tool validation and execution.
