Skip to main content
Glama

save_plan

Store implementation plans for software development projects to maintain organized documentation and track progress.

Instructions

Save the current implementation plan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
planYesThe implementation plan text to save

Implementation Reference

  • The handler function for the 'save_plan' tool. It checks for an active goal, parses the provided plan into todos using formatPlanAsTodos, adds each todo to storage, and returns a success message with the number of todos saved.
    case 'save_plan': {
      if (!this.currentGoal) {
        throw new McpError(
          ErrorCode.InvalidRequest,
          'No active goal. Start a new planning session first.'
        );
      }
    
      const { plan } = request.params.arguments as { plan: string };
      const todos = formatPlanAsTodos(plan);
    
      for (const todo of todos) {
        await storage.addTodo(this.currentGoal.id, todo);
      }
    
      return {
        content: [
          {
            type: 'text',
            text: `Successfully saved ${todos.length} todo items to the implementation plan.`,
          },
        ],
      };
    }
  • The input schema definition for the 'save_plan' tool, specifying a required 'plan' string parameter.
    inputSchema: {
      type: 'object',
      properties: {
        plan: {
          type: 'string',
          description: 'The implementation plan text to save',
        },
      },
      required: ['plan'],
    },
  • src/index.ts:127-140 (registration)
    The registration of the 'save_plan' tool in the ListToolsRequestSchema handler, including name, description, and input schema.
    {
      name: 'save_plan',
      description: 'Save the current implementation plan',
      inputSchema: {
        type: 'object',
        properties: {
          plan: {
            type: 'string',
            description: 'The implementation plan text to save',
          },
        },
        required: ['plan'],
      },
    },
  • Helper function used in save_plan to parse the plan text into structured todo objects by splitting sections, extracting title, complexity, code examples, and description.
    export const formatPlanAsTodos = (plan: string): Array<{
      title: string;
      description: string;
      complexity: number;
      codeExample?: string;
    }> => {
      // This is a placeholder implementation
      // In a real system, this would use more sophisticated parsing
      // to extract todos from the plan text
      const todos = plan.split('\n\n')
        .filter(section => section.trim().length > 0)
        .map(section => {
          const lines = section.split('\n');
          const title = lines[0].replace(/^[0-9]+\.\s*/, '').trim();
          const complexity = parseInt(section.match(/Complexity:\s*([0-9]+)/)?.[1] || '5');
          const codeExample = section.match(/\`\`\`[^\`]*\`\`\`/)?.[0];
          const description = section
            .replace(/^[0-9]+\.\s*[^\n]*\n/, '')
            .replace(/Complexity:\s*[0-9]+/, '')
            .replace(/\`\`\`[^\`]*\`\`\`/, '')
            .trim();
    
          return {
            title,
            description,
            complexity,
            codeExample: codeExample?.replace(/^\`\`\`|\`\`\`$/g, ''),
          };
        });
    
      return todos;
    };
  • Storage helper function called in the save_plan loop to add each parsed todo to the persistent plan storage for the current goal.
    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 the full burden of behavioral disclosure. While 'save' implies persistence of data, the description doesn't specify where the plan is saved (local storage, database, file), whether this overwrites existing plans or creates new ones, what permissions are required, or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.

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, clear sentence with zero wasted words. It's appropriately sized for a simple tool with one parameter and gets straight to the point 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 insufficient. It doesn't explain what happens after saving (success confirmation, error handling), where the data persists, or how this integrates with the broader system. The context signals show a simple tool, but the description should provide more complete operational 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?

The schema has 100% description coverage, with the single parameter 'plan' clearly documented as 'The implementation plan text to save'. The description doesn't add any additional meaning beyond what the schema already provides, such as format expectations, length limits, or content requirements. The baseline of 3 is appropriate when the schema does the heavy lifting.

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

Purpose3/5

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

The description states the action ('save') and resource ('current implementation plan'), providing a basic understanding of what the tool does. However, it's somewhat vague about what constitutes the 'current' plan versus other plan-related operations, and doesn't differentiate from sibling tools like 'start_planning' or other potential plan management tools.

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. There's no mention of prerequisites (like whether a plan must be created first), when this should be called during a workflow, or how it relates to sibling tools like 'start_planning' or other todo management tools.

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