Skip to main content
Glama
ZH1754629545

TickTick/Dida365 MCP Server

by ZH1754629545

update_project_by_projectID

Modify an existing project's properties including name, color, view mode, kind, and sort order using its unique ID. Returns updated project details for task management.

Instructions

Update an existing project's properties. Requires project ID. Can modify name, color, view mode, kind and sort order. Returns updated project details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe ID of the project to update (required)
nameNoNew name for the project
colorNoNew hex color code for the project
sortOrderNoUpdated sort order value
viewModeNoUpdated view mode: "list", "kanban", or "timeline"
kindNoUpdated project kind: "TASK" or "NOTE"

Implementation Reference

  • Handler for the 'update_project_by_projectID' tool. Validates input using throwValidError, constructs Project object from arguments, performs API POST to update project, and returns response as text content.
    case "update_project_by_projectID":{ const project: Project = { id : args.projectId as string, name: args.name as string, ...(args.color ? { color: args.color as string } : {}), ...(args.sortOrder ? {sortOrder: args.sortOrder as number}:0), ...(args.viewMode ? {viewMode: args.viewMode as string}:{}), ...(args.kind ? {kind:args.kind as string}:{}) }; throwValidError(args.projectId as string,"1"); const response: AxiosResponse = await dida365Api.post("/project", project); return { content: [ { type: "text", text: `项目创建成功: ${JSON.stringify(response.data, null, 2)}`, }, ], };
  • Tool definition including name, description, and inputSchema for 'update_project_by_projectID' in the ListTools response, effectively registering the tool.
    { name: "update_project_by_projectID", description: "Update an existing project's properties. Requires project ID. Can modify name, color, view mode, kind and sort order. Returns updated project details.", inputSchema: { type: "object", properties: { projectId:{ type: "string", description: "The ID of the project to update (required)" }, name: { type: "string", description: "New name for the project" }, color: { type: "string", description: "New hex color code for the project", }, sortOrder:{ type:"integer", description:"Updated sort order value" }, viewMode:{ type:"string", description:'Updated view mode: "list", "kanban", or "timeline"' }, kind:{ type:"string", description:'Updated project kind: "TASK" or "NOTE"' } }, required: ["projectId"], }, },
  • TypeScript interface definition for Project object used in the update_project_by_projectID handler.
    interface Project { id?: string; name?: string; color?: string; sortOrder?: number; viewMode? : string; kind? :string; closed?:boolean; groupId?: string; permission?:string; }
  • Helper function to validate projectId and taskId parameters, used in the tool handler.
    function throwValidError(projectId : string,taskId : string){ if(!projectId&&!taskId) throw new McpError(ErrorCode.InvalidRequest,"projectId 和 taskId 为空") if(!projectId) throw new McpError(ErrorCode.InvalidRequest,"projectId 为空") if(!taskId) throw new McpError(ErrorCode.InvalidRequest,"taskId 为空") }

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