Skip to main content
Glama

todoist_projects

Manage Todoist projects by creating, updating, archiving, and organizing them with metadata support for efficient task organization.

Instructions

Complete project management for Todoist - create, read, update, archive, and query projects with metadata support

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform
colorNoProject color
include_archivedNoInclude archived projects (for list)
is_favoriteNoMark as favorite
nameNoProject name
parent_idNoParent project ID
project_idNoProject ID (required for get/update/delete/archive/unarchive)
view_styleNoView style

Implementation Reference

  • Main execute method of TodoistProjectsTool: validates input, routes to action-specific handlers (create/get/update/delete/list/archive/unarchive), adds metadata, handles errors.
    async execute(input: unknown): Promise<TodoistProjectsOutput> { const startTime = Date.now(); try { // Validate API token before processing request await TokenValidatorSingleton.validateOnce(); // Validate input const validatedInput = TodoistProjectsInputSchema.parse(input); // Validate action-specific required fields this.validateActionRequirements(validatedInput); let result: TodoistProjectsOutput; // Route to appropriate handler based on action switch (validatedInput.action) { case 'create': result = await this.handleCreate(validatedInput); break; case 'get': result = await this.handleGet(validatedInput); break; case 'update': result = await this.handleUpdate(validatedInput); break; case 'delete': result = await this.handleDelete(validatedInput); break; case 'list': result = await this.handleList(validatedInput); break; case 'archive': result = await this.handleArchive(validatedInput); break; case 'unarchive': result = await this.handleUnarchive(validatedInput); break; default: throw new ValidationError('Invalid action specified'); } // Add operation metadata const operationTime = Date.now() - startTime; const rateLimitStatus = this.apiService.getRateLimitStatus(); result.metadata = { ...result.metadata, operation_time: operationTime, rate_limit_remaining: rateLimitStatus.rest.remaining, rate_limit_reset: new Date( rateLimitStatus.rest.resetTime ).toISOString(), }; return result; } catch (error) { return this.handleError(error, Date.now() - startTime); } }
  • Zod input schema (TodoistProjectsInputSchema) defining supported actions and parameters for the tool.
    /** * Input schema for the todoist_projects tool * Flattened for MCP client compatibility */ const TodoistProjectsInputSchema = z.object({ action: z.enum([ 'create', 'get', 'update', 'delete', 'list', 'archive', 'unarchive', ]), // Project ID (for get, update, delete, archive, unarchive) project_id: z.string().optional(), // Create/Update fields name: z.string().optional(), parent_id: z.string().optional(), color: z.string().optional(), is_favorite: z.boolean().optional(), view_style: z.enum(['list', 'board']).optional(), // List fields include_archived: z.boolean().optional(), });
  • Static getToolDefinition() providing MCP tool definition with name, description, and detailed inputSchema.
    /** * Get the MCP tool definition */ static getToolDefinition() { return { name: 'todoist_projects', description: 'Complete project management for Todoist - create, read, update, archive, and query projects with metadata support', inputSchema: { type: 'object' as const, properties: { action: { type: 'string', enum: [ 'create', 'get', 'update', 'delete', 'list', 'archive', 'unarchive', ], description: 'Action to perform', }, project_id: { type: 'string', description: 'Project ID (required for get/update/delete/archive/unarchive)', }, name: { type: 'string', description: 'Project name' }, parent_id: { type: 'string', description: 'Parent project ID' }, color: { type: 'string', description: 'Project color' }, is_favorite: { type: 'boolean', description: 'Mark as favorite' }, view_style: { type: 'string', enum: ['list', 'board'], description: 'View style', }, include_archived: { type: 'boolean', description: 'Include archived projects (for list)', }, }, required: ['action'], }, }; }
  • Instantiation of TodoistProjectsTool with config and registration in the server's tools Map by name 'todoist_projects'.
    const projectsTool = new TodoistProjectsTool(this.config); const sectionsTool = new TodoistSectionsTool(this.config); const commentsTool = new TodoistCommentsTool(this.config); const filtersTool = new TodoistFiltersTool(this.config); const remindersTool = new TodoistRemindersTool(this.config); const labelsTool = new TodoistLabelsTool(this.config); const bulkTasksTool = new TodoistBulkTasksTool(this.config); // Register tools in the map this.tools.set('todoist_tasks', tasksTools); this.tools.set('todoist_projects', projectsTool);
  • Registration of tool definition in the listTools handler response using static getToolDefinition().
    TodoistProjectsTool.getToolDefinition(),

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/shayonpal/mcp-todoist'

If you have feedback or need assistance with the MCP directory API, please join our Discord server