Skip to main content
Glama
mikemc

Todoist MCP Server

by mikemc

todoist_add_section

Create and organize sections in Todoist projects by specifying name, project ID, and optional order. Simplify task management with structured project layouts.

Instructions

Create a new section in Todoist

Args: name: Section name project_id: Project ID this section should belong to order: Order among other sections in a project (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
orderNo
project_idYes

Implementation Reference

  • The handler function that implements the logic to add a new section to a Todoist project using the Todoist API client.
    def todoist_add_section(
        ctx: Context,
        name: str,
        project_id: str,
        order: Optional[int] = None
    ) -> str:
        """Create a new section in Todoist
    
        Args:
            name: Section name
            project_id: Project ID this section should belong to
            order: Order among other sections in a project (optional)
        """
        todoist_client = ctx.request_context.lifespan_context.todoist_client
    
        try:
            logger.info(f"Creating section '{name}' in project ID: {project_id}")
    
            section_params = {
                "name": name,
                "project_id": project_id
            }
    
            if order is not None:
                section_params["order"] = order
    
            section = todoist_client.add_section(**section_params)
    
            logger.info(f"Section created successfully: {section.id}")
            return json.dumps(section.to_dict(), indent=2, default=str)
        except Exception as error:
            logger.error(f"Error creating section: {error}")
            return f"Error creating section: {str(error)}"
  • src/main.py:80-80 (registration)
    The registration of the todoist_add_section tool using the MCP FastMCP tool decorator.
    mcp.tool()(todoist_add_section)
  • src/main.py:19-25 (registration)
    Import of the todoist_add_section handler function into main.py for registration.
    from .sections import (
        todoist_get_sections,
        todoist_get_section,
        todoist_add_section,
        todoist_update_section,
        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 the full burden of behavioral disclosure. While 'Create a new section' implies a write/mutation operation, it doesn't disclose important behavioral aspects: whether this requires specific permissions, what happens if the project_id doesn't exist, whether sections can be reordered later, or what the response looks like. For a mutation tool with zero annotation coverage, this represents a significant transparency gap.

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 efficiently structured with a clear purpose statement followed by parameter explanations. Every sentence adds value, and there's no redundant information. The formatting with 'Args:' heading helps readability. It could be slightly more front-loaded by integrating the parameter information more seamlessly, but overall it's well-structured and appropriately sized.

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?

Given this is a mutation tool with no annotations and no output schema, the description provides adequate basic information but has significant gaps. It covers the purpose and parameters well, but doesn't address behavioral aspects like error conditions, permissions needed, or what the tool returns. For a tool that creates resources in a system, more context about the mutation's effects and response would be beneficial.

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?

The description provides clear semantic information for all three parameters beyond what the schema offers (0% coverage). It explains that 'name' is the section name, 'project_id' identifies which project the section belongs to, and 'order' determines positioning among other sections (and notes it's optional). This effectively compensates for the schema's lack of descriptions, though it doesn't provide format details like what constitutes a valid project_id.

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 ('Create a new section') and resource ('in Todoist'), making the purpose immediately understandable. It distinguishes this from sibling tools like todoist_add_project or todoist_create_task by specifying it creates sections rather than projects or tasks. However, it doesn't explicitly contrast with todoist_update_section, which would have made it a perfect 5.

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 when sections are appropriate versus other organizational methods, nor does it reference sibling tools like todoist_update_section for modifying existing sections. The only implied usage is creating new sections, but no context about appropriate scenarios is provided.

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