update_todo
Modify the title of an existing todo item by specifying its unique identifier and the new title text.
Instructions
Update the title of an existing todo item.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| todo_id | Yes | UUID of the todo item | |
| title | Yes | New title for the todo item |
Implementation Reference
- src/index.ts:123-146 (handler)The update_todo tool is registered and implemented directly in src/index.ts, taking todo_id and title as arguments and calling the backend via makeRequest.
mcp.tool( "update_todo", "Update the title of an existing todo item.", { todo_id: z.string().describe("UUID of the todo item"), title: z.string().describe("New title for the todo item"), }, async ({ todo_id, title }) => { try { const todo = await makeRequest<Todo>( "PUT", `/api/todos/${todo_id}`, { title } ); return { content: [{ type: "text", text: `Updated todo: ${formatTodo(todo)}` }], }; } catch (e: unknown) { if ((e as NodeJS.ErrnoException).code === "404") return { content: [{ type: "text", text: "Todo not found." }] }; throw e; } } );