things_get_someday
Retrieve all tasks marked for future consideration in the Someday list, with optional result limits for focused planning.
Instructions
Get all to-dos in Someday
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_results | No | Limit number of results returned (defaults to all if not specified) |
Implementation Reference
- src/tools/get.ts:109-173 (handler)The `execute` method in `GetToolHandler` handles the logic for the 'things_get_someday' tool by mapping it to the 'get-someday' AppleScript and executing it.
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:31-35 (registration)The 'things_get_someday' tool is defined within the `definitions` array of `GetToolHandler`.
{ name: 'things_get_someday', description: 'Get all to-dos in Someday', schema: GetListSchema },