get-recent
Retrieve recently modified tasks from Things 3 with configurable time periods, detail levels, and result limits for efficient project tracking.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | Yes | Time period, e.g. 3d, 1w, 2m, 1y | |
| detail | No | Response detail level. Defaults to compact. | |
| limit | No | Maximum number of items to return |
Implementation Reference
- src/index.ts:1422-1445 (handler)Implementation of the "get-recent" tool, which filters tasks by their creation date based on a provided relative period.
"get-recent", { period: z.string().describe("Time period, e.g. 3d, 1w, 2m, 1y"), detail: z.enum(["compact", "full"]).optional().describe("Response detail level. Defaults to compact."), limit: z.number().int().positive().optional().describe("Maximum number of items to return"), }, async ({ period, detail, limit }) => { const requestedDetail = detail ?? "compact"; const since = parseRelativePeriod(period); const items = await withDatabase((db) => applyLimit( getAllTasks(db).filter( (task) => task.created && new Date(task.created) >= since && !task.trashed ), limit ).map((task) => toTaskView(task, requestedDetail)) ); return buildTextResponse(`Found ${items.length} recently created items`, { items, detail: requestedDetail, limit: limit ?? null, }); } );