get_task
Retrieve a specific task by its ID or UUID from the Taskwarrior system. This tool enables agents to access individual task details for management and updates within the task-mcp server's claim-based workflow.
Instructions
Get a single task by ID or UUID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Task ID or UUID |
Implementation Reference
- src/index.ts:88-100 (handler)The 'get_task' tool is registered and implemented directly in src/index.ts using the server.tool handler.
server.tool('get_task', 'Get a single task by ID or UUID', { id: idParam }, async ({ id }) => { try { const tasks = await exportTasks({ status: 'all' }); const task = tasks.find((t) => String(t.id) === id || t.uuid === id); if (!task) { return { content: [{ type: 'text', text: `No task found with id or uuid: ${id}` }], isError: true, }; } return { content: [{ type: 'text', text: JSON.stringify(task, null, 2) }] }; } catch (err) { return { content: [{ type: 'text', text: (err as Error).message }], isError: true };