Skip to main content
Glama
rafliruslan

TickTick MCP Server

by rafliruslan

complete_task

Mark tasks as completed in TickTick by providing task and project IDs to update task status and track progress.

Instructions

Mark a task as completed

Input Schema

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

Implementation Reference

  • MCP tool handler for 'complete_task': validates taskId and projectId, delegates to TickTickClient.completeTask, returns formatted response with task details.
    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)}`,
          },
        ],
      };
  • src/index.ts:178-195 (registration)
    Tool registration in ListTools handler: defines name, description, and input schema requiring 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'],
      },
    },
  • TickTickClient helper method: ensures authentication and makes POST request to TickTick API to mark task as complete.
    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'}`);
      }
    }

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