get_todo
Retrieve specific todo item details by providing its unique identifier to view task information and status.
Instructions
Get details of a specific todo item.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| todo_id | Yes | UUID of the todo item |
Implementation Reference
- src/index.ts:105-120 (handler)The get_todo tool is registered and handled directly within src/index.ts. It takes a todo_id, makes an API request, and returns formatted todo details or a not found message.
mcp.tool( "get_todo", "Get details of a specific todo item.", { todo_id: z.string().describe("UUID of the todo item"), }, async ({ todo_id }) => { try { const todo = await makeRequest<Todo>("GET", `/api/todos/${todo_id}`); return { content: [{ type: "text", text: formatTodo(todo) }] }; } catch (e: unknown) { if ((e as NodeJS.ErrnoException).code === "404") return { content: [{ type: "text", text: "Todo not found." }] }; throw e; } }