Skip to main content
Glama

get_projects

Retrieve all projects from Todoist to view and manage your task organization structure.

Instructions

Get all projects from Todoist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main MCP tool handler for 'get_projects'. It calls the TodoistClient's get_projects method and formats the results into a human-readable string list.
    @mcp.tool()
    async def get_projects() -> str:
        """Get all projects from Todoist."""
        _check_client()
        
        projects = await todoist_client.get_projects()
        
        if not projects:
            return "No projects found."
        
        project_list = []
        for project in projects:
            project_info = f"• [{project.id}] {project.name}"
            if project.is_shared:
                project_info += " (Shared)"
            if project.is_favorite:
                project_info += " ⭐"
            project_list.append(project_info)
        
        return f"Found {len(projects)} projects:\n" + "\n".join(project_list)
  • The @mcp.tool() decorator registers the get_projects function as an MCP tool.
    @mcp.tool()
  • TodoistClient helper method that performs the actual API call to retrieve projects from Todoist and parses them into TodoistProject models.
    async def get_projects(self) -> List[TodoistProject]:
        """Get all projects."""
        data = await self._request("GET", "/projects")
        return [TodoistProject(**project) for project in data]
  • Pydantic schema/model for TodoistProject used in parsing API responses.
    class TodoistProject(BaseModel):
        """Represents a Todoist project."""
        id: str
        name: str
        comment_count: int = 0
        order: int = 0
        color: str = "grey"
        is_shared: bool = False
        is_favorite: bool = False
        is_inbox_project: bool = False
        is_team_inbox: bool = False
        view_style: str = "list"
        url: str = ""
        parent_id: Optional[str] = None

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