Skip to main content
Glama
mikemc

Todoist MCP Server

by mikemc

todoist_delete_section

Delete a specific section in Todoist by providing its section ID. This tool integrates with the Todoist MCP Server to streamline task management directly through Claude’s interface.

Instructions

Deletes a section from Todoist

Args: section_id: ID of the section to delete

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
section_idYes

Implementation Reference

  • The main execution logic for the todoist_delete_section tool. It retrieves the section by ID to confirm existence and get its name, then deletes it using the Todoist API client, with comprehensive logging and error handling.
    def todoist_delete_section(ctx: Context, section_id: str) -> str:
        """Deletes a section from Todoist
    
        Args:
            section_id: ID of the section to delete
        """
        todoist_client = ctx.request_context.lifespan_context.todoist_client
    
        try:
            logger.info(f"Deleting section with ID: {section_id}")
    
            try:
                section = todoist_client.get_section(section_id=section_id)
                section_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}. Deletion aborted."
    
            is_success = todoist_client.delete_section(section_id=section_id)
    
            logger.info(f"Section deleted successfully: {section_id}")
            return f"Successfully deleted section: {section_name} (ID: {section_id})"
    
        except Exception as error:
            logger.error(f"Error deleting section: {error}")
            return f"Error deleting section: {str(error)}"
  • src/main.py:82-82 (registration)
    Registers the todoist_delete_section handler function as an MCP tool using the FastMCP decorator.
    mcp.tool()(todoist_delete_section)
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. While 'Deletes' implies a destructive mutation, it doesn't specify whether deletion is permanent, reversible, requires specific permissions, or affects associated tasks. This leaves critical behavioral traits undocumented for a destructive operation.

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 two sentences that directly address purpose and parameters. The 'Args:' section is structured but could be more integrated. There's no wasted text, though it could be slightly more front-loaded by merging the parameter explanation into the main sentence.

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 destructive tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like permanence, permissions, or error conditions, nor does it explain what happens to tasks within the section. Given the complexity of deletion operations, more context is needed for safe and effective use.

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?

The description adds minimal parameter semantics beyond the schema. It states 'section_id: ID of the section to delete' which clarifies the parameter's purpose, but with 0% schema description coverage and only 1 parameter, this provides basic compensation. The baseline would be 4 for 0 parameters, but with 1 parameter and some added meaning, 3 is appropriate.

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 action ('Deletes') and resource ('a section from Todoist'), making the purpose immediately understandable. However, it doesn't differentiate this tool from other deletion tools like 'todoist_delete_project' or 'todoist_delete_task' beyond specifying the resource type.

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 a valid section_id), consequences of deletion, or when to choose this over deleting a project or task. The agent must 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

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