todoist_get_project
Retrieve a specific Todoist project by its ID using the Enhanced Todoist MCP Server Extended. Input the project ID to access detailed project information for task management and integration purposes.
Instructions
Get a specific project by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | The ID of the project to retrieve |
Implementation Reference
- src/index.ts:1379-1392 (handler)Handler function for the todoist_get_project tool that fetches and formats a specific project by ID using the Todoist API.if (name === "todoist_get_project") { if (!isProjectIdArgs(args)) { throw new Error("Invalid arguments for todoist_get_project"); } const project = await todoistClient.getProject(args.projectId); return { content: [{ type: "text", text: `Project details:\nID: ${project.id}\n${formatProject(project)}` }], isError: false, }; }
- src/index.ts:383-396 (schema)Input schema definition for the todoist_get_project tool, specifying the required projectId parameter.const GET_PROJECT_TOOL: Tool = { name: "todoist_get_project", description: "Get a specific project by its ID", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project to retrieve" } }, required: ["projectId"] } };
- src/index.ts:1097-1102 (registration)Registration of the todoist_get_project tool (as GET_PROJECT_TOOL) in the list of tools provided to the ListToolsRequestHandler.// Project tools GET_PROJECTS_TOOL, GET_PROJECT_TOOL, CREATE_PROJECT_TOOL, UPDATE_PROJECT_TOOL, DELETE_PROJECT_TOOL,
- src/index.ts:722-724 (helper)Helper function to format project details for output in the tool response.function formatProject(project: any): string { return `- ${project.name}${project.color ? `\n Color: ${project.color}` : ''}${project.isFavorite ? `\n Favorite: Yes` : ''}${project.viewStyle ? `\n View: ${project.viewStyle}` : ''}${project.parentId ? `\n Parent: ${project.parentId}` : ''}${project.id ? ` (ID: ${project.id})` : ''}`; }
- src/index.ts:823-832 (helper)Type guard function to validate arguments for todoist_get_project, ensuring projectId is a string.function isProjectIdArgs(args: unknown): args is { projectId: string; } { return ( typeof args === "object" && args !== null && "projectId" in args && typeof (args as { projectId: string }).projectId === "string" ); }