Skip to main content
Glama

update_projects

Modify Todoist project details like color, favorite status, and view style using ID or name identification.

Instructions

Update projects in Todoist Either 'id' or the 'name' to identify the target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes

Implementation Reference

  • Core logic for updating projects: resolves project ID by name if needed, validates path parameter, constructs /projects/{id} path, removes ID from params, performs POST request to Todoist API, and formats response.
    if (options.mode !== 'create' && options.idField) {
        let itemId = item[options.idField];
        let matchedName = null;
        let matchedContent = null;
    
        // If no ID but name is provided, search by name
        if (!itemId && item[options.nameField!] && options.findByName) {
            const searchName = item[options.nameField!];
            const matchedItem = options.findByName(searchName, allItems);
    
            if (!matchedItem) {
                return {
                    success: false,
                    error: `Item not found with name: ${searchName}`,
                    item,
                };
            }
    
            itemId = matchedItem.id;
            matchedName = searchName;
            matchedContent = matchedItem.content;
        }
    
        if (!itemId) {
            return {
                success: false,
                error: `Either ${options.idField} or ${options.nameField} must be provided`,
                item,
            };
        }
    
        // Apply security validation to itemId before using in path
        const safeItemId = validatePathParameter(itemId, options.idField || 'id');
    
        if (options.basePath && options.pathSuffix) {
            finalPath = `${options.basePath}${options.pathSuffix.replace('{id}', safeItemId)}`;
        } else if (options.path) {
            finalPath = options.path.replace('{id}', safeItemId);
        }
    
        delete apiParams[options.idField];
        if (options.nameField) {
            delete apiParams[options.nameField];
        }
    
        let result;
        switch (options.method) {
            case 'GET':
                result = await todoistApi.get(finalPath, apiParams);
                break;
            case 'POST':
                result = await todoistApi.post(finalPath, apiParams);
                break;
            case 'DELETE':
                result = await todoistApi.delete(finalPath);
                break;
        }
    
        const response: any = {
            success: true,
            id: itemId,
            result,
        };
    
        if (matchedName) {
            response.found_by_name = matchedName;
            response.matched_content = matchedContent;
        }
    
        return response;
    }
    // Create mode
  • Registers the 'update_projects' MCP tool using the batch API handler factory, defining input schema, HTTP method, path, update mode, ID/name fields, and name matching logic.
    createBatchApiHandler({
        name: 'update_projects',
        description: 'Update projects in Todoist',
        itemSchema: {
            id: z.string().optional().describe('ID of the project to update (preferred over name)'),
            name: z.string().optional().describe('Name of the project to update'),
            color: z.string().optional(),
            is_favorite: z.boolean().optional(),
            view_style: z.enum(['list', 'board']).optional(),
        },
        method: 'POST',
        path: '/projects/{id}',
        mode: 'update',
        idField: 'id',
        nameField: 'name',
        findByName: (name, items) =>
            items.find(item => item.name.toLowerCase().includes(name.toLowerCase())),
    });
  • Zod schema defining input parameters for updating a project: ID or name (required), optional color, favorite status, and view style.
    itemSchema: {
        id: z.string().optional().describe('ID of the project to update (preferred over name)'),
        name: z.string().optional().describe('Name of the project to update'),
        color: z.string().optional(),
        is_favorite: z.boolean().optional(),
        view_style: z.enum(['list', 'board']).optional(),
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Update' implies mutation, the description doesn't disclose important behavioral traits like whether this requires specific permissions, what happens when multiple fields are updated simultaneously, whether changes are reversible, or if there are rate limits. It mentions identification via 'id' or 'name' but doesn't explain the implications of choosing one over the other beyond 'id' being 'preferred'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with just two sentences that get straight to the point. The first sentence establishes the core purpose, and the second provides key usage information. There's no wasted language or unnecessary elaboration, though it could be slightly more structured by explicitly separating purpose from parameter guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations, 0% schema description coverage, and no output schema, the description is incomplete. It doesn't explain what fields can be updated beyond the identification parameters, doesn't describe the expected response format, and doesn't address error conditions or prerequisites. Given the complexity of updating multiple projects with various fields, the description provides insufficient context for effective tool use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for the lack of parameter documentation. The description only mentions 'id' and 'name' as identification parameters, completely ignoring the other three parameters (color, is_favorite, view_style) that are present in the schema. This leaves most parameters undocumented and their purposes unclear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Update' and resource 'projects in Todoist', making the purpose immediately understandable. It distinguishes from siblings like 'create_projects' and 'delete_projects' by specifying this is for updating existing projects rather than creating new ones or deleting them. However, it doesn't fully differentiate from 'move_projects' which also modifies projects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some usage guidance by stating 'Either 'id' or the 'name' to identify the target', which helps understand how to select which project to update. However, it doesn't explicitly state when to use this tool versus alternatives like 'move_projects' or when not to use it (e.g., for creating new projects). The guidance is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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