Skip to main content
Glama

get_projects

Retrieve all your Todoist projects to view, organize, and manage your task lists and workflows in one centralized location.

Instructions

Get all projects from Todoist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'get_projects'. Decorated with @mcp.tool(), calls the client to fetch projects and formats them as a 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)
  • Helper method in TodoistClient that makes the API request to fetch projects 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 defining the structure of a Todoist project, used in get_projects response parsing.
    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