Skip to main content
Glama
Johnxjp

Todoist Python MCP Server

by Johnxjp

create_task

Add new tasks to Todoist with content, due dates, priorities, labels, and project assignments for task management.

Instructions

Create a new task

Args:
- 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.
- project_id [str]: The ID of the project to add the task. If none, adds to user's inbox by default.
- 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.
- section_id [str]: The ID of the section to add the task to

Returns:
- task_id: str:

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
descriptionNo
project_idNo
labelsNo
priorityNo
due_dateNo
section_idNo

Implementation Reference

  • The main handler function for the 'create_task' tool, decorated with @mcp.tool() which also handles registration. It creates a new task in Todoist using the todoist_api.add_task method, constructing parameters from inputs, and returns the new task ID.
    @mcp.tool()
    def create_task(
        content: str,
        description: Optional[str] = None,
        project_id: Optional[str] = None,
        labels: Optional[list[str]] = None,
        priority: Optional[int] = None,
        due_date: Optional[str] = None,
        section_id: Optional[str] = None,
    ) -> str:
        """
        Create a new task
    
        Args:
        - 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.
        - project_id [str]: The ID of the project to add the task. If none, adds to user's inbox by default.
        - 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.
        - section_id [str]: The ID of the section to add the task to
    
        Returns:
        - task_id: str:
        """
        try:
            data = {}
            if description:
                data["description"] = description
            if project_id:
                data["project_id"] = project_id
            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 section_id:
                data["section_id"] = section_id
    
            task = todoist_api.add_task(content, **data)
            return task.id
        except Exception as e:
            raise Exception(f"Couldn't create 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 the full burden of behavioral disclosure. While 'Create a new task' implies a write/mutation operation, the description doesn't address important behavioral aspects like authentication requirements, error conditions, rate limits, whether the operation is idempotent, or what happens with duplicate tasks. The description mentions markdown support but doesn't explain behavioral implications.

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

Conciseness4/5

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

The description is well-structured with clear sections for Args and Returns, making it easy to parse. While somewhat lengthy due to detailed parameter explanations, every sentence adds value. The front-loaded purpose statement is clear, though the parameter details could be more efficiently organized.

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 a 7-parameter mutation tool with no annotations and no output schema, the description does a good job with parameter semantics but falls short on behavioral context. It explains what parameters do but not how the tool behaves overall. The return value documentation is minimal ('task_id: str'), leaving the agent uncertain about the full response structure or potential errors.

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 excellent parameter semantics that significantly enhance the 0% schema description coverage. For all 7 parameters, it explains their purpose, format constraints (e.g., 'YYYY-MM-DD format relative to user's timezone'), allowed values (e.g., 'priority from 1 (normal) to 4 (urgent)'), and default behaviors (e.g., 'adds to user's inbox by default'). This goes far beyond what the bare schema provides.

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 'Create a new task' which is a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'update_task' which might also create tasks in some contexts, nor does it mention what makes this creation operation distinct from other task-related operations.

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 'update_task' or 'complete_task'. There's no mention of prerequisites, when this tool is appropriate versus other task management approaches, or any contextual limitations.

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