Skip to main content
Glama

get_project

Retrieve a specific Todoist project by its unique ID to access project details and manage tasks within that project.

Instructions

Get a specific project by ID.

Args: project_id: The ID of the project to retrieve

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes

Implementation Reference

  • The main handler function for the MCP tool 'get_project'. It is decorated with @mcp.tool() for registration, performs client check, fetches the project using TodoistClient, and returns a formatted string response.
    @mcp.tool() async def get_project(project_id: str) -> str: """Get a specific project by ID. Args: project_id: The ID of the project to retrieve """ _check_client() project = await todoist_client.get_project(project_id) return ( f"Project: {project.name}\n" f"ID: {project.id}\n" f"Color: {project.color}\n" f"Shared: {project.is_shared}\n" f"Favorite: {project.is_favorite}\n" f"View Style: {project.view_style}\n" f"URL: {project.url}" )
  • Helper method in TodoistClient that makes the HTTP GET request to Todoist API to retrieve a specific project and parses it into TodoistProject model.
    async def get_project(self, project_id: str) -> TodoistProject: """Get a specific project by ID.""" data = await self._request("GET", f"/projects/{project_id}") return TodoistProject(**data)
  • Pydantic BaseModel schema defining the structure and types for TodoistProject objects returned by the API.
    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