things_get_todo_details
Retrieve comprehensive details for a specific to-do item, including deadline, notes, and current status, to manage tasks effectively within the Things 3 app.
Instructions
Get detailed information about a specific to-do including deadline, notes, status, etc.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of the to-do to get detailed information for |
Implementation Reference
- src/tools/get.ts:109-173 (handler)The execute function in GetToolHandler handles the logic for executing AppleScripts, including the 'things_get_todo_details' tool, mapping it to the 'get-todo-details' script and parsing the output using 'parseTodoDetails'.
async execute(toolName: string, params: GetParams): Promise<string> { let scriptName: string; // Handle the get_list tool separately if (toolName === 'things_get_list') { const listParams = params as z.infer<typeof GetListByNameSchema>; scriptName = this.listNameToScript[listParams.list]; if (!scriptName) { throw new Error(`Unknown list: ${listParams.list}`); } } else { scriptName = this.scriptMap[toolName]; if (!scriptName) { throw new Error(`Unknown tool: ${toolName}`); } } let scriptArgs: string[] = []; const options = { maxResults: (params as any).max_results }; // Handle specific tools that need arguments if (toolName === 'things_get_project') { const projectParams = params as z.infer<typeof GetProjectSchema>; scriptArgs = [projectParams.project_id]; } else if (toolName === 'things_get_area') { const areaParams = params as z.infer<typeof GetAreaSchema>; scriptArgs = [areaParams.area_id]; } else if (toolName === 'things_get_todo_details') { const todoParams = params as z.infer<typeof GetTodoDetailsSchema>; scriptArgs = [todoParams.id]; // Don't pass maxResults for todo details since it's a single item delete options.maxResults; } const output = await executeAppleScriptFile(scriptName, scriptArgs, options); // Return empty array for empty output if (!output.trim()) { const emptyResult = toolName.includes('project') || toolName.includes('area') ? { todos: [] } : { [this.getResultKey(toolName)]: [] }; return JSON.stringify(emptyResult, null, 2); } // Parse based on tool type let result; switch (toolName) { case 'things_get_projects': result = { projects: parseProjectList(output) }; break; case 'things_get_areas': result = { areas: parseAreaList(output) }; break; case 'things_get_tags': result = { tags: parseTagList(output) }; break; case 'things_get_todo_details': result = parseTodoDetails(output); break; default: result = { todos: parseTodoList(output) }; } return JSON.stringify(result, null, 2); } - src/tools/get.ts:77-80 (registration)The 'things_get_todo_details' tool definition including its schema registration within the GetToolHandler class.
name: 'things_get_todo_details', description: 'Get detailed information about a specific to-do including deadline, notes, status, etc.', schema: GetTodoDetailsSchema } - src/tools/get.ts:3-3 (schema)The input schema for 'things_get_todo_details' imported from '../types/mcp.js'.
import { GetProjectSchema, GetAreaSchema, GetListSchema, GetListByNameSchema, GetTodoDetailsSchema } from '../types/mcp.js';