Skip to main content
Glama

get_task

Retrieve a specific task by its ID and project ID using the TickTick MCP Server, enabling precise task management and integration with AI assistants.

Instructions

Get a specific task by ID

Input Schema

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

Implementation Reference

  • Core implementation that performs the API call to retrieve a specific task by ID from the TickTick API using the 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'}`); } }
  • MCP server handler for the 'get_task' tool: validates input parameters, calls the TickTickClient.getTaskById method, and formats the response as MCP content.
    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:197-213 (registration)
    Tool registration in the ListTools response, including name, description, and input schema definition.
    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'], }, },
  • Input schema definition for the 'get_task' tool, specifying required taskId and projectId parameters.
    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'], }, },

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