Skip to main content
Glama

add_todo

Add a new task to your software development plan with title, description, complexity score, and optional code example for implementation tracking.

Instructions

Add a new todo item to the current plan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the todo item
descriptionYesDetailed description of the todo item
complexityYesComplexity score (0-10)
codeExampleNoOptional code example

Implementation Reference

  • MCP tool handler for 'add_todo' which checks for current goal, extracts todo arguments, delegates to storage.addTodo, and returns the created todo as JSON text.
    case 'add_todo': {
      if (!this.currentGoal) {
        throw new McpError(
          ErrorCode.InvalidRequest,
          'No active goal. Start a new planning session first.'
        );
      }
    
      const todo = request.params.arguments as Omit<
        Todo,
        'id' | 'isComplete' | 'createdAt' | 'updatedAt'
      >;
      const newTodo = await storage.addTodo(this.currentGoal.id, todo);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(newTodo, null, 2),
          },
        ],
      };
    }
  • Input JSON schema for the 'add_todo' tool defining required title, description, complexity and optional codeExample.
    inputSchema: {
      type: 'object',
      properties: {
        title: {
          type: 'string',
          description: 'Title of the todo item',
        },
        description: {
          type: 'string',
          description: 'Detailed description of the todo item',
        },
        complexity: {
          type: 'number',
          description: 'Complexity score (0-10)',
          minimum: 0,
          maximum: 10,
        },
        codeExample: {
          type: 'string',
          description: 'Optional code example',
        },
      },
      required: ['title', 'description', 'complexity'],
    },
  • src/index.ts:141-168 (registration)
    Registration of the 'add_todo' tool in the ListToolsRequestSchema handler's tools array.
    {
      name: 'add_todo',
      description: 'Add a new todo item to the current plan',
      inputSchema: {
        type: 'object',
        properties: {
          title: {
            type: 'string',
            description: 'Title of the todo item',
          },
          description: {
            type: 'string',
            description: 'Detailed description of the todo item',
          },
          complexity: {
            type: 'number',
            description: 'Complexity score (0-10)',
            minimum: 0,
            maximum: 10,
          },
          codeExample: {
            type: 'string',
            description: 'Optional code example',
          },
        },
        required: ['title', 'description', 'complexity'],
      },
    },
  • Helper function in storage that implements adding a todo: fetches plan, creates full Todo object, appends to plan, saves to JSON file, returns todo.
    async addTodo(
      goalId: string,
      { title, description, complexity, codeExample }: Omit<Todo, 'id' | 'isComplete' | 'createdAt' | 'updatedAt'>
    ): Promise<Todo> {
      const plan = await this.getPlan(goalId);
      if (!plan) {
        throw new Error(`No plan found for goal ${goalId}`);
      }
    
      const todo: Todo = {
        id: Date.now().toString(),
        title,
        description,
        complexity,
        codeExample,
        isComplete: false,
        createdAt: new Date().toISOString(),
        updatedAt: new Date().toISOString(),
      };
    
      plan.todos.push(todo);
      plan.updatedAt = new Date().toISOString();
      await this.save();
      return todo;
    }
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. 'Add a new todo item' implies a write/mutation operation, but it doesn't specify permissions needed, whether the addition is permanent or temporary, error conditions, or what happens on success (e.g., returns ID). For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 gets straight to the point with zero wasted words. It's appropriately sized for this simple tool and front-loads the essential information without unnecessary elaboration.

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 insufficiently complete. It doesn't explain what 'current plan' means, whether the addition is saved automatically, what the tool returns, or error handling. Given the complexity (4 parameters including a numeric range) and lack of structured behavioral information, the description should provide more context.

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%, so the schema already documents all 4 parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 ('Add') and resource ('new todo item to the current plan'), making the purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'update_todo_status' or 'remove_todo', but the verb 'Add' provides reasonable distinction. It's not tautological with the name 'add_todo' since it adds context about the 'current plan'.

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 'update_todo_status' or 'remove_todo'. It mentions 'current plan' but doesn't explain what that means or whether prerequisites like 'start_planning' are required. There's no explicit when/when-not usage context.

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/NightTrek/Software-planning-mcp'

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