Skip to main content
Glama

plan_task

Creates structured plans for coding tasks by breaking work into steps with dependencies, validation criteria, and complexity estimates. Use before starting significant coding work.

Instructions

Creates a structured plan for completing a coding task. Breaks down the work into steps with dependencies, validation criteria, and estimated complexity. Use before starting any significant coding work.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesDescription of the task to plan
contextNoCurrent project context, tech stack, constraints
scopeNoExpected scope of the task

Implementation Reference

  • The main handler function for the 'plan_task' tool. It generates a structured markdown plan based on the input task, optional context, and scope. Returns a text content block with the plan.
    export function planTaskHandler(args: any) {
        const { task, context = "", scope = "medium" } = args;
    
        const plan = `# Task Plan: ${task}
    
    ## Context
    ${context || "No additional context provided."}
    
    ## Scope Assessment
    **Estimated Scope**: ${scope}
    
    ## Pre-Implementation Checklist
    - [ ] Understand requirements fully
    - [ ] Identify affected files/components
    - [ ] Consider edge cases
    - [ ] Plan for testing
    
    ## Implementation Steps
    
    ### Step 1: Analysis
    - Review existing codebase
    - Identify integration points
    - Document assumptions
    
    ### Step 2: Design
    - Define interfaces/types
    - Plan component structure
    - Consider error handling
    
    ### Step 3: Implementation
    - Write core functionality
    - Follow coding standards
    - Add inline documentation
    
    ### Step 4: Testing
    - Write unit tests
    - Test edge cases
    - Integration testing
    
    ### Step 5: Review
    - Self-review code
    - Check for security issues
    - Validate performance
    
    ## Validation Criteria
    - [ ] All tests pass
    - [ ] No linting errors
    - [ ] Documentation updated
    - [ ] Code reviewed
    
    ## Rollback Plan
    If issues arise, revert to previous state and reassess approach.
    `;
    
        return {
            content: [{ type: "text", text: plan }]
        };
    }
  • The Zod schema definition for the 'plan_task' tool, defining input parameters: task (required string), context (optional string), scope (optional enum).
    export const planTaskSchema = {
        name: "plan_task",
        description: "Creates a structured plan for completing a coding task. Breaks down the work into steps with dependencies, validation criteria, and estimated complexity. Use before starting any significant coding work.",
        inputSchema: z.object({
            task: z.string().describe("Description of the task to plan"),
            context: z.string().optional().describe("Current project context, tech stack, constraints"),
            scope: z.enum(["small", "medium", "large"]).optional().describe("Expected scope of the task")
        })
    };
  • src/server.ts:89-89 (registration)
    Registration of the 'plan_task' tool in the toolRegistry Map used by the HTTP server in src/server.ts.
    ["plan_task", { schema: planTaskSchema, handler: planTaskHandler }],
  • src/index.ts:79-79 (registration)
    Registration of the 'plan_task' tool in the toolRegistry Map used by the stdio MCP server in src/index.ts.
    ["plan_task", { schema: planTaskSchema, handler: planTaskHandler }],
Behavior2/5

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

No annotations are provided, so the description carries the full burden. While it mentions the output structure ('steps with dependencies, validation criteria, and estimated complexity'), it doesn't disclose important behavioral traits like whether this is a read-only analysis or creates persistent artifacts, what permissions might be needed, or how the complexity estimation works.

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 perfectly concise with two sentences that each earn their place. The first sentence explains what the tool does, and the second provides clear usage guidance. No wasted words or unnecessary information.

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?

For a planning tool with 3 parameters, 100% schema coverage, and no output schema, the description is adequate but has gaps. It explains the purpose and usage well but lacks details about the output format, how the planning algorithm works, or what makes this different from similar planning approaches.

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 parameters. The description doesn't add any parameter-specific information beyond what's in the schema. 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.

Purpose5/5

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

The description clearly states the tool's purpose with specific verbs ('creates a structured plan', 'breaks down the work') and resources ('coding task'). It distinguishes from siblings by focusing on planning rather than analysis, brainstorming, or implementation tasks.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: 'Use before starting any significant coding work.' This provides clear temporal guidance and distinguishes it from tools used during or after coding.

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/millsydotdev/Code-MCP'

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