Skip to main content
Glama
Johnxjp

Todoist Python MCP Server

by Johnxjp

update_task

Modify task attributes like content, priority, due dates, or labels in Todoist using the task ID to update existing tasks.

Instructions

Update an attribute of a task given its ID. Any attribute can be updated.

Args:
- task_id [str | int]: The ID of the task to update. Example '1234567890' or 1234567890
- content [str]: Task content. This value may contain markdown-formatted text and hyperlinks. Details on markdown support can be found in the Text Formatting article in the Help Center.
- description [str]: A description for the task. This value may contain markdown-formatted text and hyperlinks. Details on markdown support can be found in the Text Formatting article in the Help Center.
- labels [list[str]]: The task's labels (a list of names that may represent either personal or shared labels).
- priority [int]: Task priority from 1 (normal) to 4 (urgent).
- due_date [str]: Specific date in YYYY-MM-DD format relative to user’s timezone.
- deadline_date [str]: Specific date in YYYY-MM-DD format relative to user’s timezone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes
contentNo
descriptionNo
labelsNo
priorityNo
due_dateNo
deadline_dateNo

Implementation Reference

  • The handler function for the 'update_task' MCP tool. It is decorated with @mcp.tool() for registration and implements the logic to update a Todoist task by constructing a data dict from provided parameters and calling todoist_api.update_task.
    @mcp.tool()
    def update_task(
        task_id: str,
        content: Optional[str] = None,
        description: Optional[str] = None,
        labels: Optional[list[str]] = None,
        priority: Optional[int] = None,
        due_date: Optional[str] = None,
        deadline_date: Optional[str] = None,
    ):
        """
        Update an attribute of a task given its ID. Any attribute can be updated.
    
        Args:
        - task_id [str | int]: The ID of the task to update. Example '1234567890' or 1234567890
        - content [str]: Task content. This value may contain markdown-formatted text and hyperlinks. Details on markdown support can be found in the Text Formatting article in the Help Center.
        - description [str]: A description for the task. This value may contain markdown-formatted text and hyperlinks. Details on markdown support can be found in the Text Formatting article in the Help Center.
        - labels [list[str]]: The task's labels (a list of names that may represent either personal or shared labels).
        - priority [int]: Task priority from 1 (normal) to 4 (urgent).
        - due_date [str]: Specific date in YYYY-MM-DD format relative to user’s timezone.
        - deadline_date [str]: Specific date in YYYY-MM-DD format relative to user’s timezone.
        """
    
        # Client sometimes struggle to convert int to str
        task_id = task_id.strip('"')
        try:
            data = {}
            if content:
                data["content"] = content
            if description:
                data["description"] = description
            if labels:
                if isinstance(labels, str):
                    labels = [labels]
                data["labels"] = labels
            if priority:
                data["priority"] = priority
            if due_date:
                data["due_date"] = due_date
            if deadline_date:
                data["deadline_date"] = deadline_date
    
            is_success = todoist_api.update_task(task_id=task_id, **data)
            if not is_success:
                raise Exception
    
            return "Task updated successfully"
        except Exception as e:
            raise Exception(f"Couldn't update task {str(e)}")
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is an update operation (implying mutation) but doesn't mention permission requirements, whether updates are partial or complete, what happens with null values, or error behavior. The description adds some context about markdown support in content/description fields, but lacks critical behavioral details for a mutation tool.

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

Conciseness3/5

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

The description is appropriately sized but not optimally structured. The opening statement is clear, but the parameter documentation could be more concise. Some information (like the repeated markdown support note) is redundant. However, it's not excessively verbose and the parameter explanations are useful.

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

Completeness3/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 7 parameters, no annotations, and no output schema, the description is moderately complete. It excels at parameter documentation but lacks behavioral context (permissions, error handling, update semantics) and output information. For a tool that modifies data, more behavioral transparency would be expected.

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

Parameters5/5

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

The description provides extensive parameter semantics beyond the schema, which has 0% description coverage. For each parameter, it explains: data types (str/int for task_id), format examples, markdown support for content/description, label types, priority range (1-4), and date formats with timezone context. This fully compensates for the schema's lack of descriptions.

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 purpose: 'Update an attribute of a task given its ID. Any attribute can be updated.' This specifies the verb ('update'), resource ('task'), and scope ('any attribute'). However, it doesn't explicitly distinguish this from sibling tools like 'complete_task' or 'delete_task' beyond the basic action difference.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'complete_task' or 'create_task'. It doesn't mention prerequisites (e.g., needing an existing task ID), error conditions, or typical use cases. The only implied usage is when you need to modify task attributes.

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/Johnxjp/todoist-mcp-python'

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