log-completed
Move completed tasks to the Logbook in Things 3 by specifying their IDs, enabling organized tracking of finished work.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | IDs of todos to move to Logbook |
Implementation Reference
- src/index.ts:1675-1705 (handler)The handler for the "log-completed" tool, which uses AppleScript to instruct Things 3 to move the specified todo items to the Logbook.
"log-completed", { ids: z.array(z.string()).describe("IDs of todos to move to Logbook"), }, async ({ ids }) => { const appleScriptStatus = await getAppleScriptOperationalStatus(); if (!appleScriptStatus.operational) { return buildTextResponse("Unable to log completed todos", { success: false, ids, available: appleScriptStatus.available, operational: appleScriptStatus.operational, error: appleScriptStatus.operationalError ?? appleScriptStatus.availabilityError, }); } const script = ` tell application "${THINGS_APP_SCRIPT_TARGET}" repeat with itemID in {${ids.map((id) => `"${id}"`).join(", ")}} log completed to do id (itemID as text) end repeat end tell `.trim(); const result = await tryAppleScript(script); return buildTextResponse( result.ok ? "Logged completed todos" : "Unable to log completed todos", result.ok ? { success: true, ids } : { success: false, ids, error: result.error } ); } );