complete_task
Mark a task complete or uncomplete by specifying its GUID. Sets completion timestamp to now or clears it.
Instructions
[Official API + UAT, v1.3.7] Mark a task complete (or uncomplete it). Convenience wrapper around update_task with completed_at.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_guid | Yes | Task GUID | |
| completed | No | true → mark complete (uses Date.now()); false → uncomplete (sets completed_at to "0"). Default true. |
Implementation Reference
- src/tools/tasks.js:145-149 (handler)The handler function that executes the 'complete_task' tool. It extracts the 'completed' boolean (defaulting to true), then calls the official client's completeTask method, returning a text response indicating completion or uncompletion.
async complete_task(args, ctx) { const completed = args.completed === undefined ? true : !!args.completed; const r = await ctx.getOfficialClient().completeTask(args.task_guid, completed); return text(`Task ${completed ? 'completed' : 'uncompleted'}: ${args.task_guid}`); }, - src/tools/tasks.js:74-85 (schema)The input schema for the 'complete_task' tool. Defines the tool's name, description, and inputSchema with properties 'task_guid' (required string) and 'completed' (optional boolean, default true).
{ name: 'complete_task', description: '[Official API + UAT, v1.3.7] Mark a task complete (or uncomplete it). Convenience wrapper around update_task with completed_at.', inputSchema: { type: 'object', properties: { task_guid: { type: 'string', description: 'Task GUID' }, completed: { type: 'boolean', description: 'true → mark complete (uses Date.now()); false → uncomplete (sets completed_at to "0"). Default true.' }, }, required: ['task_guid'], }, }, - src/server.js:51-57 (registration)Registration of the tasks tool module in the server. Line 51 requires './tools/tasks', and lines 56-57 collect all schemas and handlers into TOOLS and HANDLERS for the MCP server.
require('./tools/tasks'), require('./tools/uploads'), require('./tools/wiki'), ]; const TOOLS = TOOL_MODULES.flatMap((m) => m.schemas); const HANDLERS = Object.fromEntries(TOOL_MODULES.flatMap((m) => Object.entries(m.handlers))); - src/clients/official/tasks.js:90-95 (helper)The helper/client method 'completeTask' that actually performs the API call. It computes a completed_at timestamp (Date.now() for true, '0' for false) and delegates to updateTask with the ['completed_at'] field.
// completed=true marks done now; completed=false un-completes (sets completed_at to "0") async completeTask(taskGuid, completed = true) { if (!taskGuid) throw new Error('completeTask: task_guid is required'); const completedAt = completed ? String(Date.now()) : '0'; return this.updateTask(taskGuid, { completed_at: completedAt }, ['completed_at']); },