get_project
Retrieve a specific Todoist project by its ID to view project details and manage associated tasks.
Instructions
Get a specific project by ID.
Args:
project_id: The ID of the project to retrieve
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes |
Implementation Reference
- todoist_mcp/server.py:257-276 (handler)The MCP tool handler for 'get_project'. It checks the client, fetches the project using the TodoistClient, and formats the response as a string.@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}" )
- todoist_mcp/client.py:159-162 (helper)The TodoistClient helper method that performs the actual API call to retrieve project details 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)
- todoist_mcp/client.py:27-41 (schema)Pydantic model defining the structure of a TodoistProject used in the tool response.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
- todoist_mcp/server.py:257-257 (registration)The @mcp.tool() decorator registers the get_project function as an MCP tool.@mcp.tool()