get_task_by_projectId_and_taskId
Retrieve detailed task information from TickTick/Dida365 by specifying both project and task IDs. Get complete task data including title, content, status, due date, priority, and subtasks.
Instructions
Retrieve a specific task's details by providing both the project ID and task ID. Returns complete task information including title, content, status, due date, priority, and subtasks if any.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | The ID of the project containing the task (required) | |
| taskId | Yes | The ID of the task to retrieve (required) |
Implementation Reference
- src/index.ts:375-390 (handler)Handler for the 'get_task_by_projectId_and_taskId' tool. Validates input parameters, calls the Dida365 API to fetch the specific task, and returns the task details as formatted JSON text.
case "get_task_by_projectId_and_taskId":{ const params: Record<string, any> = {}; if(!args.projectId||!args.taskId) throw new McpError(ErrorCode.InvalidRequest, "项目ID或任务ID为空") if (args.projectId) params.projectId = args.projectId; if (args.taskId) params.taskId = args.taskId; const response = await dida365Api.get(`/project/${params.projectId}/task/${params.taskId}`); return { content: [ { type: "text", text: `任务: ${JSON.stringify(response.data, null, 2)}`, }, ], }; } - src/index.ts:141-154 (schema)Input schema definition for the tool, specifying required string parameters projectId and taskId.
inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project containing the task (required)" }, taskId: { type: "string", description: "The ID of the task to retrieve (required)" } }, required: ["projectId","taskId"] } - src/index.ts:138-155 (registration)Tool registration in the ListTools handler, defining name, description, and input schema.
{ name: "get_task_by_projectId_and_taskId", description: "Retrieve a specific task's details by providing both the project ID and task ID. Returns complete task information including title, content, status, due date, priority, and subtasks if any.", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project containing the task (required)" }, taskId: { type: "string", description: "The ID of the task to retrieve (required)" } }, required: ["projectId","taskId"] } },