Skip to main content
Glama

get_task

Retrieve a specific Todoist task by its ID to view details or manage it through the Todoist MCP Server.

Instructions

Get a specific task by ID.

Args:
    task_id: The ID of the task to retrieve

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'get_task', registered via @mcp.tool() decorator, formats and returns task details by delegating to TodoistClient.
    @mcp.tool()
    async def get_task(task_id: str) -> str:
        """Get a specific task by ID.
        
        Args:
            task_id: The ID of the task to retrieve
        """
        _check_client()
        
        task = await todoist_client.get_task(task_id)
        
        return (
            f"Task: {task.content}\n"
            f"ID: {task.id}\n"
            f"Description: {task.description}\n"
            f"Completed: {task.is_completed}\n"
            f"Priority: {task.priority}\n"
            f"Labels: {', '.join(task.labels) if task.labels else 'None'}\n"
            f"Due: {task.due_string or task.due_date or 'None'}\n"
            f"Project ID: {task.project_id}\n"
            f"URL: {task.url}"
        )
  • Core implementation in TodoistClient that fetches the specific task from Todoist REST API using GET /tasks/{task_id}.
    async def get_task(self, task_id: str) -> TodoistTask:
        """Get a specific task by ID."""
        data = await self._request("GET", f"/tasks/{task_id}")
        return TodoistTask(**data)
  • Pydantic BaseModel schema for TodoistTask, defining the structure parsed from API response in get_task.
    class TodoistTask(BaseModel):
        """Represents a Todoist task."""
        id: str
        content: str
        description: str = ""
        is_completed: bool = False
        labels: List[str] = []
        priority: int = 1
        due_string: Optional[str] = None
        due_date: Optional[str] = None
        project_id: str = ""
        section_id: Optional[str] = None
        parent_id: Optional[str] = None
        order: int = 0
        url: str = ""
        created_at: str = ""
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. It states this is a retrieval operation ('Get'), implying it's likely read-only, but doesn't confirm this or describe any other behavioral traits like error conditions, authentication requirements, rate limits, or what happens if the task ID doesn't exist.

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 concise with two sentences that directly address purpose and parameters. The structure is front-loaded with the main purpose first, though the parameter documentation could be more integrated rather than appearing as a separate 'Args' section.

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 the tool has an output schema (which handles return values) and only one parameter, the description is minimally adequate. However, for a retrieval tool with no annotations, it should ideally mention that this is a read-only operation and clarify what happens with invalid IDs to provide better context for the agent.

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?

The description adds basic meaning for the single parameter ('The ID of the task to retrieve'), which is helpful since schema description coverage is 0%. However, it doesn't provide format details, validation rules, or examples that would be valuable for a parameter with no schema documentation.

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 tool's purpose with a specific verb ('Get') and resource ('a specific task by ID'), making it immediately understandable. However, it doesn't differentiate this tool from its sibling 'get_tasks' which presumably retrieves multiple tasks, missing an opportunity for sibling distinction.

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 'get_tasks' or other task-related tools. While the purpose is clear, there are no explicit instructions about prerequisites, appropriate contexts, or comparisons with sibling tools.

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/dan-bailey/todoist-mcp'

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