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
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes |
Implementation Reference
- todoist_mcp/server.py:257-276 (handler)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}" )
- todoist_mcp/client.py:159-162 (helper)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)
- todoist_mcp/client.py:27-41 (schema)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