Skip to main content
Glama
mikemc

Todoist MCP Server

by mikemc

todoist_get_task

Retrieve an active task from Todoist using its unique task ID, enabling users to access and manage task details directly through the Todoist MCP Server.

Instructions

Get an active task from Todoist

Args: task_id: ID of the task to retrieve

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes

Implementation Reference

  • The main handler function that retrieves a single Todoist task by its ID using the Todoist API, handles errors, and returns the task as JSON.
    def todoist_get_task(ctx: Context, task_id: str) -> str:
        """Get an active task from Todoist
    
        Args:
            task_id: ID of the task to retrieve
        """
        todoist_client = ctx.request_context.lifespan_context.todoist_client
    
        try:
            logger.info(f"Getting task with ID: {task_id}")
    
            task = todoist_client.get_task(task_id=task_id)
    
            if not task:
                logger.info(f"No task found with ID: {task_id}")
                return f"No task found with ID: {task_id}"
    
            logger.info(f"Retrieved task: {task.id}")
            return json.dumps(task.to_dict(), indent=2, default=str)
        except Exception as error:
            logger.error(f"Error getting task: {error}")
            return f"Error getting task: {str(error)}"
  • src/main.py:84-84 (registration)
    Registration of the todoist_get_task tool with the MCP server using the decorator.
    mcp.tool()(todoist_get_task)
  • src/main.py:26-36 (registration)
    Import of the todoist_get_task function from tasks module for use in main.py registration.
    from .tasks import (
        todoist_get_task,
        todoist_get_tasks,
        todoist_filter_tasks,
        todoist_add_task,
        todoist_update_task,
        todoist_complete_task,
        todoist_uncomplete_task,
        todoist_move_task,
        todoist_delete_task,
    )
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 retrieves an 'active' task, which implies it won't return completed tasks, adding some useful context. However, it doesn't disclose error conditions (e.g., what happens with invalid task IDs), authentication requirements, rate limits, or what format the returned task data will have.

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 appropriately brief with two sentences: a clear purpose statement followed by parameter documentation. The 'Args:' section is well-structured but could be more integrated. No wasted words, though the formatting could be slightly cleaner.

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?

For a read operation with 1 parameter and no output schema, the description is incomplete. It doesn't explain what 'active' means operationally, what data will be returned, error handling, or how this differs from sibling retrieval tools. With no annotations and no output schema, more behavioral context is needed for effective use.

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 0%, so the description must compensate. It provides the parameter name ('task_id') and clarifies it's 'ID of the task to retrieve', which adds basic semantic meaning beyond the schema's type information. However, it doesn't explain format (e.g., numeric string, UUID), where to find task IDs, or validation rules.

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 verb ('Get') and resource ('an active task from Todoist'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'todoist_get_tasks' (plural) or explain what distinguishes retrieving a single task versus multiple tasks.

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 'todoist_get_tasks' or 'todoist_close_task'. It doesn't mention prerequisites (e.g., needing an existing task ID) or contextual factors that would make this the appropriate choice over other retrieval options.

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

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/mikemc/todoist-mcp-server'

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