Skip to main content
Glama
mikemc

Todoist MCP Server

by mikemc

todoist_update_section

Modify the name of a specific section in Todoist by providing its ID and the updated section name for better task organization.

Instructions

Updates a section in Todoist

Args: section_id: ID of the section to update name: New name for the section

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
section_idYes

Implementation Reference

  • The main handler function for the todoist_update_section tool. It updates a Todoist section's name using the Todoist API client from the context, handles errors, and returns the updated section as JSON.
    def todoist_update_section(ctx: Context, section_id: str, name: str) -> str:
        """Updates a section in Todoist
    
        Args:
            section_id: ID of the section to update
            name: New name for the section
        """
        todoist_client = ctx.request_context.lifespan_context.todoist_client
    
        try:
            logger.info(f"Updating section with ID: {section_id}")
    
            # Capture original name for informative response messages
            try:
                section = todoist_client.get_section(section_id=section_id)
                original_name = section.name
            except Exception as error:
                logger.warning(f"Error getting section with ID: {section_id}: {error}")
                return f"Could not verify section with ID: {section_id}. Update aborted."
    
            updated_section = todoist_client.update_section(section_id=section_id, name=name)
    
            logger.info(f"Section updated successfully: {section_id}")
            return json.dumps(updated_section.to_dict(), indent=2, default=str)
    
        except Exception as error:
            logger.error(f"Error updating section: {error}")
            return f"Error updating section: {str(error)}"
  • src/main.py:81-81 (registration)
    Registers the todoist_update_section function as an MCP tool using the FastMCP decorator.
    mcp.tool()(todoist_update_section)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is an update operation, implying mutation, but doesn't cover critical aspects like required permissions, whether changes are reversible, error conditions (e.g., invalid section_id), or what the response looks like. This leaves significant gaps for a mutation tool.

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 front-loaded with the core purpose in the first sentence, followed by a clear 'Args:' section listing parameters. It's efficient with minimal waste, though the formatting (e.g., bullet-like indentation) could be slightly more polished for readability.

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

Completeness3/5

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

For a mutation tool with 2 parameters, 0% schema coverage, no annotations, and no output schema, the description is minimally adequate. It covers the purpose and parameters but lacks behavioral details (e.g., side effects, errors, response format). Given the complexity, it should do more to compensate for the missing structured data.

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

Parameters4/5

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

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description compensates by explaining both parameters: 'section_id' as 'ID of the section to update' and 'name' as 'New name for the section'. This adds essential meaning beyond the bare schema, though it doesn't detail format constraints (e.g., ID structure or name length limits).

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 ('Updates') and resource ('a section in Todoist'), making the purpose unambiguous. It distinguishes this from sibling tools like 'todoist_add_section' (create) and 'todoist_delete_section' (delete), though it doesn't explicitly differentiate from 'todoist_update_project' or 'todoist_update_task' which update different resources.

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. It doesn't mention prerequisites (e.g., needing an existing section), exclusions, or compare it to similar tools like 'todoist_update_project' or 'todoist_update_task'. The agent must infer usage from the tool name and context 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

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

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