Skip to main content
Glama
ZH1754629545

TickTick/Dida365 MCP Server

by ZH1754629545

get_tasks_by_projectId

Retrieve all tasks from a specific project in TickTick/Dida365 using the project ID to view and manage project-related tasks.

Instructions

Get all tasks belonging to a specific project by project ID. Returns a list of tasks with their basic information. Useful for viewing all tasks in a project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe ID of the project whose tasks you want to list (required)

Implementation Reference

  • The handler for the 'get_tasks_by_projectId' tool. It validates the projectId argument, makes an API call to the Dida365 endpoint `/project/{projectId}/data` to fetch tasks, and returns the response data as a formatted JSON text block.
    case "get_tasks_by_projectId": { const params: Record<string, any> = {}; if (args.projectId) params.projectId = args.projectId; else throw new McpError(ErrorCode.InvalidRequest, "项目名称为空"); const response = await dida365Api.get(`/project/${params.projectId}/data`); return { content: [ { type: "text", text: `任务列表: ${JSON.stringify(response.data, null, 2)}`, }, ], }; }
  • src/index.ts:156-169 (registration)
    Registration of the 'get_tasks_by_projectId' tool in the ListTools response, including its name, description, and input schema definition.
    { name: "get_tasks_by_projectId", description: "Get all tasks belonging to a specific project by project ID. Returns a list of tasks with their basic information. Useful for viewing all tasks in a project.", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project whose tasks you want to list (required)", }, }, required: ["projectId"], }, },
  • TypeScript interface defining the structure of Task objects, used for typing API responses in the get_tasks_by_projectId handler.
    interface Task { id?: string; // Task identifier projectId?: string; // Task project id title?: string; // Task title isAllDay?: boolean; // All day completedTime?: string; // Task completed time in "yyyy-MM-dd'T'HH:mm:ssZ" content?: string; // Task content desc?: string; // Task description of checklist dueDate?: string; // Task due date time in "yyyy-MM-dd'T'HH:mm:ssZ" items?: ChecklistItem[]; // Subtasks of Task priority?: 0 | 1 | 3 | 5 | number; // Task priority: None:0, Low:1, Medium:3, High:5 reminders?: string[]; // List of reminder triggers repeatFlag?: string; // Recurring rules of task sortOrder?: number; // Task sort order startDate?: string; // Start date time in "yyyy-MM-dd'T'HH:mm:ssZ" status?: 0 | 2 | number; // Task completion status: Normal: 0, Completed: 2 timeZone?: string; // Task timezone }
  • Axios client instance configured with base URL and authorization token for Dida365 API, used by the tool handler to make requests.
    const dida365Api = axios.create({ baseURL: DIDA365_BASE_URL, headers: { "Content-Type": "application/json", Authorization: DIDA365_TOKEN, }, });

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/ZH1754629545/dida365-mcp-servers'

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