Skip to main content
Glama

update_task

Modify existing Todoist tasks by updating their title, description, labels, priority, or due date. Only the fields you specify will be changed.

Instructions

Update a Todoist task with new title, description, labels, priority, or due string. All fields are optional - only provided fields will be updated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe ID of the task to update (required)
titleNoNew title for the task
descriptionNoNew description for the task
labelsNoArray of label names to assign to the task
priorityNoPriority level (1-4, where 1 is highest priority)
due_stringNoHuman defined task due date (ex.: "next Monday", "Tomorrow"). Value is set using local (not UTC) time. Using "no date" or "no due date" removes the date.

Implementation Reference

  • Primary handler implementation for the 'update_task' tool. Validates input, constructs parameters, invokes the updateTask service, and returns MCP-formatted response or error.
    export const updateTaskTool: Tool = {
      schema: {
        name: 'update_task',
        description:
          'Update a Todoist task with new title, description, labels, priority, or due string. All fields are optional - only provided fields will be updated.',
        inputSchema: {
          type: 'object',
          properties: {
            task_id: {
              type: 'string',
              description: 'The ID of the task to update (required)',
            },
            title: {
              type: 'string',
              description: 'New title for the task',
            },
            description: {
              type: 'string',
              description: 'New description for the task',
            },
            labels: {
              type: 'array',
              items: {
                type: 'string',
              },
              description: 'Array of label names to assign to the task',
            },
            priority: {
              type: 'number',
              description: 'Priority level (1-4, where 1 is highest priority)',
            },
            due_string: {
              type: 'string',
              description:
                'Human defined task due date (ex.: "next Monday", "Tomorrow"). Value is set using local (not UTC) time. Using "no date" or "no due date" removes the date.',
            },
          },
          required: ['task_id'],
        },
      },
      handler: async (args: {
        task_id: string;
        title?: string;
        description?: string;
        labels?: string[];
        priority?: number;
        due_string?: string;
      }): Promise<{
        content: Array<{
          type: 'text';
          text: string;
        }>;
      }> => {
        console.error('Executing update_task...');
        const { task_id, title, description, labels, priority, due_string } = args;
    
        if (!task_id) {
          throw new Error('task_id is required');
        }
    
        try {
          // Build service parameters with only provided fields
          const serviceParams: any = {
            taskId: task_id,
          };
    
          if (title !== undefined) {
            serviceParams.title = title;
          }
    
          if (description !== undefined) {
            serviceParams.description = description;
          }
    
          if (labels !== undefined) {
            serviceParams.labels = labels;
          }
    
          if (priority !== undefined) {
            serviceParams.priority = priority;
          }
    
          if (due_string !== undefined) {
            serviceParams.dueString = due_string;
          }
    
          const result = await updateTask(serviceParams);
          console.error('update_task completed successfully');
    
          return {
            content: [
              {
                type: 'text',
                text: result,
              },
            ],
          };
        } catch (error) {
          console.error('update_task error:', error);
          return {
            content: [
              {
                type: 'text',
                text: `Error: ${
                  error instanceof Error ? error.message : 'Unknown error'
                }`,
              },
            ],
          };
        }
      },
    };
  • Type definition for UpdateTaskParams used by the updateTask service and tool handler for input validation.
    export interface UpdateTaskParams {
      taskId: string;
      title?: string;
      description?: string;
      labels?: string[];
      priority?: number;
      dueString?: string;
    }
  • Registers 'update_task' handler in the toolsWithArgs registry for dispatching tool calls in handleToolRequest.
    const toolsWithArgs: Record<string, (args: any) => Promise<ToolResponse>> = {
      get_task_comments: getTaskCommentsTool.handler,
      create_project_label: createProjectLabelTool.handler,
      create_task_comment: createTaskCommentTool.handler,
      update_task: updateTaskTool.handler,
      create_task: createTaskTool.handler,
      move_task: moveTaskTool.handler,
      get_tasks_with_label: getTasksWithLabelTool.handler,
      complete_task: completeTaskTool.handler,
      uncomplete_task: uncompleteTaskTool.handler,
      search_tasks: searchTasksTool.handler,
      search_tasks_using_and: searchTasksUsingAndTool.handler,
      search_tasks_using_or: searchTasksUsingOrTool.handler,
      complete_becky_task: completeBeckyTaskTool.handler,
    };
  • src/index.ts:79-117 (registration)
    Registers updateTaskTool.schema in the list of available tools for ListToolsRequestHandler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          getTaskCommentsTool.schema,
          listPersonalInboxTasksTool.schema,
          listBrianInboxPerBeckyTasksTool.schema,
          listBeckyInboxPerBrianTasksTool.schema,
          listNextActionsTool.schema,
          getBrianOnlyProjectsTool.schema,
          getBrianSharedProjectsTool.schema,
          getBeckySharedProjectsTool.schema,
          getInboxProjectsTool.schema,
          createProjectLabelTool.schema,
          createTaskCommentTool.schema,
          updateTaskTool.schema,
          createTaskTool.schema,
          moveTaskTool.schema,
          getContextLabelsTool.schema,
          getTasksWithLabelTool.schema,
          completeTaskTool.schema,
          uncompleteTaskTool.schema,
          searchTasksTool.schema,
          searchTasksUsingAndTool.schema,
          searchTasksUsingOrTool.schema,
          getChoresDueTodayTool.schema,
          getTasksDueTomorrowTool.schema,
          getTasksDueThisWeekTool.schema,
          getTicklerTasksTool.schema,
          listGtdProjectsTool.schema,
          getWaitingTasksTool.schema,
          getRecentMediaTool.schema,
          getAreasOfFocusTool.schema,
          getShoppingListTool.schema,
          completeBeckyTaskTool.schema,
          listBrianTimeSensitiveTasksTool.schema,
          listBeckyTimeSensitiveTasksTool.schema,
        ],
      };
    });
  • Core service function that performs the Todoist API update on the task, handles rename comments, and throws errors.
    export async function updateTask(params: UpdateTaskParams): Promise<string> {
      const client = getTodoistClient();
    
      try {
        const oldTitle = params.title
          ? await retrieveOldTaskTitle(params.taskId)
          : undefined;
    
        const updatePayload = buildUpdatePayload(params);
        await performTaskUpdate(client, params.taskId, updatePayload);
    
        if (params.title && oldTitle) {
          await handleTaskRename(params.taskId, oldTitle, params.title);
        }
    
        return 'Task updated successfully';
      } catch (error) {
        throw new Error(`Failed to update task: ${getErrorMessage(error)}`);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions that the tool updates tasks and that fields are optional, but lacks details on permissions required, whether updates are reversible, rate limits, error handling, or what the response looks like. For a mutation tool with zero annotation coverage, this is a significant gap in behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose and followed by a clarifying note on optional fields. Every sentence earns its place with no wasted words, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like side effects, error cases, or response format, leaving gaps that could hinder an AI agent's ability to use the tool correctly in complex scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly (e.g., 'task_id' as required, 'priority' as 1-4). The description adds minimal value by listing the updatable fields and noting they are optional, but doesn't provide additional semantics beyond what's in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update a Todoist task') and specifies the fields that can be modified ('new title, description, labels, priority, or due string'). It distinguishes from sibling tools like 'create_task' by focusing on updates rather than creation, though it doesn't explicitly differentiate from similar update operations like 'move_task'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when modifying existing tasks and mentions that 'All fields are optional - only provided fields will be updated,' which provides some context on how to use it. However, it doesn't explicitly state when to choose this tool over alternatives like 'complete_task' or 'move_task,' nor does it mention prerequisites or error conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/bkotos/todoist-mcp'

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