API Reference
todoListTools
function todoListTools(store?): Tool<ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>[];Defined in: tools/builtin/todo-list.ts:184
Build the todo_append, todo_list, and todo_update tools over a TodoStore.
Parameters
| Parameter | Type | Description |
|---|---|---|
store | TodoStore | The backing store. Defaults to a fresh InMemoryTodoStore. |
Returns
Tool<ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>[]
[todo_append, todo_list, todo_update], ready for runAgent or a ToolRegistry.
Remarks
All three run ExecutionMode.Sequential: they share one mutable list, so
a batch the model emits in a single turn applies in request order rather than
racing. The store's throws propagate so a structural violation surfaces as an
isError tool result the model can react to.
See
Example
const todos = new InMemoryTodoStore();
await runAgent({ ...opts, tools: todoListTools(todos) });
// todo_append({ id: "step-1", content: "Inspect repo", status: "pending" })