Skip to main content
Glama

update_task

Modify an existing task by updating its title, content, due date, priority, or tags using the task ID. Integrates with TickTick for efficient task management.

Instructions

Update an existing task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNoNew task description/content
dueDateNoNew due date in ISO format
priorityNoNew task priority (0=None, 1=Low, 3=Medium, 5=High)
tagsNoNew task tags
taskIdYesTask ID to update (required)
titleNoNew task title

Implementation Reference

  • MCP CallTool handler for 'update_task': validates required taskId argument and delegates to TickTickClient.updateTask, formatting the response as MCP content.
    case 'update_task': if (!args?.taskId) { throw new McpError(ErrorCode.InvalidParams, 'Task ID is required'); } const updatedTask = await this.ticktickClient!.updateTask(args.taskId as string, args); return { content: [ { type: 'text', text: `Task updated successfully: ${JSON.stringify(updatedTask, null, 2)}`, }, ], };
  • src/index.ts:125-159 (registration)
    Registration of the 'update_task' tool in the ListTools response, including name, description, and JSON input schema defining parameters like taskId (required), title, content, etc.
    { name: 'update_task', description: 'Update an existing task', inputSchema: { type: 'object', properties: { taskId: { type: 'string', description: 'Task ID to update (required)', }, title: { type: 'string', description: 'New task title', }, content: { type: 'string', description: 'New task description/content', }, dueDate: { type: 'string', description: 'New due date in ISO format', }, priority: { type: 'number', description: 'New task priority (0=None, 1=Low, 3=Medium, 5=High)', }, tags: { type: 'array', items: { type: 'string' }, description: 'New task tags', }, }, required: ['taskId'], }, },
  • TickTickClient helper method that performs the actual API call to update a task by posting updates to /task/{taskId} endpoint after ensuring authentication.
    async updateTask(taskId: string, updates: Partial<TickTickTask>): Promise<TickTickTask> { await this.ensureAuthenticated(); try { const response = await this.client.post(`/task/${taskId}`, updates); return response.data; } catch (error) { throw new Error(`Failed to update task: ${error instanceof Error ? error.message : 'Unknown error'}`); } }

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