Skip to main content
Glama
Johnxjp

Todoist Python MCP Server

by Johnxjp

get_projects

Retrieve all project folders from Todoist to organize and manage tasks effectively.

Instructions

Get all todo projects. These are like folders for tasks in Todoist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_projects' MCP tool. Decorated with @mcp.tool() for registration. Fetches projects from the Todoist API, maps them to Project dataclasses, and returns the list. Handles exceptions by returning an error message.
    @mcp.tool()
    def get_projects() -> list[Project]:
        """Get all todo projects. These are like folders for tasks in Todoist"""
        try:
            projects: TodoistProjectResponse = todoist_api.get_projects()
            return [Project(p.id, p.name) for p in projects]
        except Exception as e:
            return f"Error: Couldn't fetch projects {str(e)}"
  • Dataclass defining the Project schema used as the return type for get_projects tool.
    @dataclass
    class Project:
        id: str
        name: str
  • Helper function that uses get_projects to find a project ID by name.
    def get_project_id_by_name(project_name: str) -> str:
        """Search for a project by name and return its ID"""
        projects = get_projects()
        for project in projects:
            if project.name.lower() == project_name.lower():
                return project.id
        return None
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 'Get all todo projects' but doesn't disclose behavioral traits such as whether it requires authentication, rate limits, pagination, or the format of the return data. The analogy adds some context but lacks operational details.

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 short sentences with zero waste. It front-loads the purpose ('Get all todo projects') and adds a clarifying analogy efficiently. Every sentence earns its place by enhancing understanding without redundancy.

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 no parameters and no output schema, the description is moderately complete. It explains what the tool does and provides an analogy, but without annotations or output schema, it lacks details on behavior, return format, or error handling. It's adequate for a simple read operation but has gaps.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. Baseline for 0 parameters is 4, as it avoids unnecessary information.

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 ('Get all') and resource ('todo projects'), with a helpful analogy ('like folders for tasks in Todoist') that clarifies the concept. However, it doesn't explicitly differentiate from sibling tools like 'get_tasks', which retrieves tasks rather than projects.

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?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't mention if this should be used for listing all projects versus filtering or if there are prerequisites like authentication. The description only states what it does, not when to use it.

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