get-someday
Retrieve tasks marked for future consideration from Things 3, with options to control detail level and quantity of results.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | Response detail level. Defaults to compact. | |
| limit | No | Maximum number of todos to return |
Implementation Reference
- src/index.ts:1327-1345 (handler)The `get-someday` tool handler, which fetches all "Someday" todos using the `getSomedayTodos` helper and formats them using `toTaskView`.
"get-someday", { detail: z.enum(["compact", "full"]).optional().describe("Response detail level. Defaults to compact."), limit: z.number().int().positive().optional().describe("Maximum number of todos to return"), }, async ({ detail, limit }) => { const requestedDetail = detail ?? "compact"; const todos = await withDatabase((db) => applyLimit(getSomedayTodos(getAllTasks(db)), limit).map((task) => toTaskView(task, requestedDetail) ) ); return buildTextResponse(`Found ${todos.length} someday todos`, { todos, detail: requestedDetail, limit: limit ?? null, }); } ); - src/index.ts:678-695 (helper)The `getSomedayTodos` helper function that processes all tasks to filter out the relevant "Someday" todos.
function getSomedayTodos(tasks: TaskRecord[]) { const incomplete = filterNonTrashedIncompleteTodos(tasks); const { somedayProjectIds, headingToProject } = getSomedayContext(tasks); const byId = new Map<string, TaskRecord>(); for (const task of incomplete) { if (task.start === "Someday" && task.startDate === null) { byId.set(task.id, task); continue; } if (isTaskInSomedayProject(task, somedayProjectIds, headingToProject)) { byId.set(task.id, task); } } return [...byId.values()]; }