Skip to main content
Glama
rafliruslan

TickTick MCP Server

by rafliruslan

get_task

Retrieve a specific task from TickTick using its task ID and project ID to access detailed task information for management or review.

Instructions

Get a specific task by ID

Input Schema

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

Implementation Reference

  • MCP handler for 'get_task' tool: validates taskId and projectId, fetches task using TickTickClient.getTaskById, returns JSON stringified task.
    case 'get_task':
      if (!args?.taskId || !args?.projectId) {
        throw new McpError(ErrorCode.InvalidParams, 'Task ID and Project ID are required');
      }
      const task = await this.ticktickClient!.getTaskById(args.taskId as string, args.projectId as string);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(task, null, 2),
          },
        ],
      };
  • src/index.ts:196-213 (registration)
    Registration of 'get_task' tool in ListTools handler, defining name, description, and input schema.
    {
      name: 'get_task',
      description: 'Get a specific task by ID',
      inputSchema: {
        type: 'object',
        properties: {
          taskId: {
            type: 'string',
            description: 'Task ID to retrieve (required)',
          },
          projectId: {
            type: 'string',
            description: 'Project ID containing the task (required)',
          },
        },
        required: ['taskId', 'projectId'],
      },
    },
  • TickTickClient method implementing the API call to retrieve a specific task by projectId and taskId.
    async getTaskById(taskId: string, projectId: string): Promise<TickTickTask> {
      await this.ensureAuthenticated();
      
      try {
        const response = await this.client.get(`/project/${projectId}/task/${taskId}`);
        return response.data;
      } catch (error) {
        throw new Error(`Failed to get 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