archive_task
Archives a task by its ID, moving it from active view to the archive for organized task management.
Instructions
Archives a task.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Task ID |
Implementation Reference
- src/tools/tasks.ts:254-261 (handler)The archive_task tool handler: defines the schema (id: string), calls SpClient.archiveTask(id), and returns the result.
server.tool( "archive_task", "Archives a task.", { id: z.string().describe("Task ID") }, async ({ id }) => { const task = await SpClient.archiveTask(id); return ok(task); } - src/sp-client.ts:255-259 (helper)The SpClient.archiveTask() method that performs the actual HTTP request to POST /tasks/{id}/archive
archiveTask(id: string): Promise<Task> { return request(`/tasks/${id}/archive`, TaskSchema, { method: "POST", }); }, - src/index.ts:5-17 (registration)The tool registration entry point: registerTaskTools(server) is called in index.ts which registers all task tools including archive_task on the MCP server.
import { registerTaskTools } from "./tools/tasks.js"; import { registerProjectTools } from "./tools/projects.js"; import { registerResources } from "./resources.js"; import { registerPrompts } from "./prompts.js"; const server = new McpServer({ name: "super-productivity-mcp", version: "1.0.0", }); // Register everything registerTaskTools(server); registerProjectTools(server);