Skip to main content
Glama
greirson

Todoist MCP Server

todoist_label_update

Modify existing Todoist labels by updating their name, color, order, or favorite status using either label ID or name.

Instructions

Update an existing label in Todoist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
label_idNoID of the label to update (provide this OR label_name)
label_nameNoName of the label to update (provide this OR label_id)
nameNoNew name for the label (optional)
colorNoNew color for the label (optional)
orderNoNew order position for the label (optional)
is_favoriteNoWhether the label should be marked as favorite (optional)

Implementation Reference

  • Core handler function that finds the label by ID or name, validates updates, calls Todoist API to update the label, clears caches, and returns a success message with changes.
    export async function handleUpdateLabel(
      todoistClient: TodoistApi,
      args: UpdateLabelArgs
    ): Promise<string> {
      const label = await findLabel(todoistClient, {
        label_id: args.label_id,
        label_name: args.label_name,
      });
    
      const validatedUpdates = validateLabelUpdate(args);
    
      try {
        await todoistClient.updateLabel(label.id, {
          name: validatedUpdates.name,
          color: validatedUpdates.color,
          order: validatedUpdates.order,
          isFavorite: validatedUpdates.is_favorite,
        });
    
        labelCache.clear();
        labelStatsCache.clear();
    
        const changes: string[] = [];
        if (validatedUpdates.name) changes.push(`name: "${validatedUpdates.name}"`);
        if (validatedUpdates.color)
          changes.push(`color: "${validatedUpdates.color}"`);
        if (validatedUpdates.order !== undefined)
          changes.push(`order: ${validatedUpdates.order}`);
        if (validatedUpdates.is_favorite !== undefined)
          changes.push(`favorite: ${validatedUpdates.is_favorite}`);
    
        return `Label "${label.name}" updated successfully${changes.length > 0 ? ` (${changes.join(", ")})` : ""}`;
      } catch (error) {
        throw new TodoistAPIError(
          `Failed to update label "${label.name}"`,
          error instanceof Error ? error : undefined
        );
      }
    }
  • Tool schema definition including name, description, and input schema for validating arguments.
    export const UPDATE_LABEL_TOOL: Tool = {
      name: "todoist_label_update",
      description: "Update an existing label in Todoist",
      inputSchema: {
        type: "object",
        properties: {
          label_id: {
            type: "string",
            description: "ID of the label to update (provide this OR label_name)",
          },
          label_name: {
            type: "string",
            description: "Name of the label to update (provide this OR label_id)",
          },
          name: {
            type: "string",
            description: "New name for the label (optional)",
          },
          color: {
            type: "string",
            description: "New color for the label (optional)",
          },
          order: {
            type: "number",
            description: "New order position for the label (optional)",
          },
          is_favorite: {
            type: "boolean",
            description:
              "Whether the label should be marked as favorite (optional)",
          },
        },
      },
    };
  • src/index.ts:268-273 (registration)
    Switch case in main server request handler that validates arguments using type guard and dispatches to the handleUpdateLabel function.
    case "todoist_label_update":
      if (!isUpdateLabelArgs(args)) {
        throw new Error("Invalid arguments for todoist_label_update");
      }
      result = await handleUpdateLabel(apiClient, args);
      break;
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Update an existing label' implies a mutation operation but doesn't specify required permissions, whether changes are reversible, rate limits, or what happens if the label doesn't exist. For a mutation tool with zero annotation coverage, this leaves critical behavioral aspects undocumented.

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

Conciseness5/5

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

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a straightforward update operation and front-loads the essential information, making it easy for an agent to parse quickly.

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 and no output schema, the description is inadequate. It doesn't explain what fields can be updated, what the response looks like, error conditions, or how this differs from other label operations. Given the complexity of a 6-parameter update operation, more context is needed for the agent to use this tool effectively.

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

Parameters3/5

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

Schema description coverage is 100%, providing complete documentation for all 6 parameters. The description adds no parameter-specific information beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting. However, it doesn't compensate with additional context about parameter interactions or constraints.

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 ('an existing label in Todoist'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'todoist_label_create' or 'todoist_task_update' beyond the resource type, missing explicit distinction about what makes label updates unique versus other update operations.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'todoist_label_create' for new labels or 'todoist_label_delete' for removal. There's no mention of prerequisites, error conditions, or typical use cases, leaving the agent to infer usage from the tool name alone.

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

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