Skip to main content
Glama

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
NameRequiredDescriptionDefault
idsYesIDs of todos to move to Logbook

Implementation Reference

  • 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 }
        );
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/soycanopa/SupaThings-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server