Skip to main content
Glama

complete_task

Mark a specific task as completed by providing the task and project IDs. Integrates with TickTick for efficient task management and timezone handling.

Instructions

Mark a task as completed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID containing the task (required)
taskIdYesTask ID to complete (required)

Implementation Reference

  • The core handler function in TickTickClient that executes the tool logic: authenticates the session and makes a POST request to the TickTick API to mark the task as completed.
    async completeTask(taskId: string, projectId: string): Promise<TickTickTask> { await this.ensureAuthenticated(); try { const response = await this.client.post(`/project/${projectId}/task/${taskId}/complete`); return response.data; } catch (error) { throw new Error(`Failed to complete task: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
  • The input schema and metadata for the 'complete_task' tool, defining required parameters taskId and projectId.
    { name: 'complete_task', description: 'Mark a task as completed', inputSchema: { type: 'object', properties: { taskId: { type: 'string', description: 'Task ID to complete (required)', }, projectId: { type: 'string', description: 'Project ID containing the task (required)', }, }, required: ['taskId', 'projectId'], }, },
  • src/index.ts:312-324 (registration)
    MCP tool registration and dispatching logic in the CallToolRequestSchema handler, which validates arguments and calls the TickTickClient.completeTask method.
    case 'complete_task': if (!args?.taskId || !args?.projectId) { throw new McpError(ErrorCode.InvalidParams, 'Task ID and Project ID are required'); } const completedTask = await this.ticktickClient!.completeTask(args.taskId as string, args.projectId as string); return { content: [ { type: 'text', text: `Task completed successfully: ${JSON.stringify(completedTask, null, 2)}`, }, ], };

Other Tools

Related Tools

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/rafliruslan/ticktick-mcp-server'

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