Skip to main content
Glama
PhilippMT

Software Planning Tool

by PhilippMT

add_todo

Add a new task to your software development plan with title, description, complexity score, and optional code examples for better project management.

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': validates current goal exists, casts arguments to Todo shape, calls storage.addTodo, and returns the new 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),
          },
        ],
      };
    }
  • Tool registration in ListTools response, including input schema definition for 'add_todo' matching Todo properties.
    {
      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'],
      },
    },
  • TypeScript interface Todo defining the structure used for add_todo inputs and storage.
    export interface Todo {
      id: string;
      title: string;
      description: string;
      complexity: number;
      codeExample?: string;
      isComplete: boolean;
      createdAt: string;
      updatedAt: string;
    }
  • Storage helper function that implements the core logic: creates Todo with generated id/timestamps, appends to plan.todos, persists to JSON file.
    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;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description bears the full burden of behavioral disclosure. It only states the action, omitting prerequisites (e.g., existence of a current plan), side effects (e.g., modifies in-memory plan vs saved plan), and error behavior. This is insufficient 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.

Conciseness5/5

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

The description is a single sentence with no wasted words. It front-loads the primary purpose effectively, which is exactly what a concise description should do.

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?

The description is too terse for a mutation tool with no annotations. It does not explain the dependency on a current plan, the workflow in which add_todo fits, or what happens if the plan state is invalid. This lack of context could lead to incorrect usage.

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 input schema provides 100% coverage with descriptions for all four parameters. The tool description adds no additional parameter meaning, so the schema carries the load. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb-resource pair ('Add a new todo item') and clarifies scope ('to the current plan'). This clearly distinguishes it from siblings like remove_todo, get_todos, and update_todo_status, which deal with different actions.

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

Usage Guidelines3/5

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

Usage is implied: it is for adding new todo items to the current plan. However, there is no explicit guidance on when to use this instead of update_todo_status or what conditions must exist (e.g., an active plan). No alternatives or exclusions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.