get-logbook
Retrieve completed tasks from Things 3 with configurable time periods, entry limits, and detail levels for analysis and review.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | Time period to look back, e.g. 7d or 1w | |
| limit | No | Maximum number of entries | |
| detail | No | Response detail level. Defaults to compact. |
Implementation Reference
- src/index.ts:1348-1373 (handler)Implementation of the "get-logbook" MCP tool, which queries the database for completed or canceled tasks, optionally filters them by time period, and returns them formatted.
"get-logbook", { period: z.string().optional().describe("Time period to look back, e.g. 7d or 1w"), limit: z.number().int().positive().optional().describe("Maximum number of entries"), detail: z.enum(["compact", "full"]).optional().describe("Response detail level. Defaults to compact."), }, async ({ period, limit, detail }) => { const requestedDetail = detail ?? "compact"; let todos = await withDatabase((db) => getLogbookTodos(getAllTasks(db))); if (period) { const since = parseRelativePeriod(period); todos = todos.filter( (todo) => todo.stopDate && new Date(todo.stopDate) >= since ); } todos = applyLimit(todos, limit); return buildTextResponse(`Found ${todos.length} logbook items`, { todos: todos.map((todo) => toTaskView(todo, requestedDetail)), detail: requestedDetail, limit: limit ?? null, }); } );