Skip to main content
Glama

Ultra Plan

ultra-plan

Plan multi-step features with revisions and branches for software development tasks. Define requirements, scope, and track progress through iterative planning workflows.

Instructions

Multi-step feature planning with revisions and branches

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesWhat to plan (e.g., "add user profiles", "implement payment system")
requirementsNoSpecific requirements or constraints
scopeNoPlanning scope and depthstandard
providerNoAI provider to use
modelNoSpecific model to use
stepNumberNoCurrent step in the planning workflow
totalStepsNoEstimated total steps needed
currentStepNoCurrent planning step content
nextStepRequiredNoWhether another step is needed
isRevisionNoTrue if this step revises a previous step
revisingStepNoWhich step number is being revised
isBranchingNoTrue if exploring alternative approach
branchingFromNoWhich step to branch from
branchIdNoIdentifier for this planning branch

Implementation Reference

  • Main handler function for the 'ultra-plan' tool. Implements multi-step planning workflow with support for revisions and branching, using AI providers to generate structured plans.
      async handlePlan(args: unknown): Promise<HandlerResponse> {
        const params = PlanSchema.parse(args);
        const { provider: requestedProvider, model: requestedModel, stepNumber, totalSteps, nextStepRequired, task, requirements, scope, currentStep, isRevision, revisingStep, isBranching, branchingFrom, branchId } = params;
        
        const config = await this.configManager.getConfig();
        const providerName = requestedProvider || await this.providerManager.getPreferredProvider();
        const provider = await this.providerManager.getProvider(providerName);
        
        if (!provider) {
          throw new Error('No AI provider configured. Please run: bunx ultra-mcp config');
        }
    
        try {
          let context = '';
          let requiredActions: string[] = [];
          
          if (stepNumber === 1) {
            context = `You are creating a ${scope} implementation plan.
            
    Task: ${task}
    ${requirements ? `Requirements: ${requirements}` : ''}
    
    Create a structured plan by:
    1. Understanding the full scope of the task
    2. Breaking it down into logical phases
    3. Identifying dependencies and prerequisites  
    4. Considering potential challenges
    5. Defining success criteria`;
    
            requiredActions = [
              'Analyze the task requirements thoroughly',
              'Identify all stakeholders and dependencies',
              'Break down into major phases or milestones',
              'Consider technical and resource constraints',
              'Define clear success metrics',
            ];
          } else if (isRevision && revisingStep) {
            context = `You are revising step ${revisingStep} of your plan based on new insights.
    
    Previous step content: ${currentStep}
    
    Revise this step considering:
    - New information discovered
    - Better approaches identified
    - Feedback or constraints
    - Improved clarity or detail`;
    
            requiredActions = [
              'Review the original step content',
              'Identify what needs revision and why',
              'Incorporate new insights or corrections',
              'Ensure consistency with other steps',
              'Update dependencies if needed',
            ];
          } else if (isBranching && branchingFrom) {
            context = `You are exploring an alternative approach branching from step ${branchingFrom}.
    
    Branch: ${branchId || 'Alternative Approach'}
    
    Explore a different path by:
    - Taking a fundamentally different approach
    - Using alternative technologies or methods
    - Addressing the same goal differently`;
    
            requiredActions = [
              'Define the alternative approach clearly',
              'Explain why this branch is worth exploring',
              'Outline the different steps in this path',
              'Compare trade-offs with the main approach',
              'Identify unique benefits or risks',
            ];
          } else {
            const stepContext = stepNumber <= 3 && totalSteps >= 5
              ? '\n\nIMPORTANT: This is an early planning stage. Take time to think deeply about strategic decisions, architectural choices, and long-term implications before moving to tactical details.'
              : '';
              
            context = `Continue planning step ${stepNumber} of ${totalSteps}.
    
    Previous planning: ${currentStep}
    
    Develop the next aspect of your plan:
    - Build on previous steps
    - Add more detail and specificity
    - Address dependencies and risks
    - Include concrete actions${stepContext}`;
    
            requiredActions = [
              'Review previous planning steps',
              'Identify the next logical planning element',
              'Add specific implementation details',
              'Consider risks and mitigation strategies',
              'Ensure alignment with overall objectives',
            ];
          }
    
          const prompt = `${context}\n\nProvide your planning for step ${stepNumber} of ${totalSteps}.`;
          
          const fullResponse = await provider.generateText({
            prompt,
            model: requestedModel,
            temperature: 0.6,
            systemPrompt: scope === 'comprehensive' 
              ? 'Provide detailed, thorough planning with multiple alternatives considered.'
              : scope === 'minimal'
              ? 'Keep planning concise and focused on essential elements only.'
              : 'Balance detail with clarity in your planning.',
            useSearchGrounding: false,
          });
    
          // TODO: Implement tracking
          // await trackUsage({
          //   tool: 'ultra-plan',
          //   model: provider.getActiveModel(),
          //   provider: provider.getName(),
          //   input_tokens: 0,
          //   output_tokens: 0,
          //   cache_tokens: 0,
          //   total_tokens: 0,
          //   has_credentials: true,
          // });
    
          const formattedResponse = formatWorkflowResponse(
            stepNumber,
            totalSteps,
            nextStepRequired,
            fullResponse.text,
            requiredActions
          );
    
          return {
            content: [{ type: 'text', text: formattedResponse }],
          };
        } catch (error) {
          logger.error('Planning failed:', error);
          throw error;
        }
      }
  • Zod schema defining input parameters for the ultra-plan tool, including task, scope, workflow steps, and branching/revision fields.
    export const PlanSchema = z.object({
      task: z.string().describe('What to plan (e.g., "add user profiles", "implement payment system")'),
      requirements: z.string().optional().describe('Specific requirements or constraints'),
      scope: z.enum(['minimal', 'standard', 'comprehensive']).default('standard')
        .describe('Planning scope and depth'),
      provider: z.enum(['openai', 'gemini', 'azure', 'grok']).optional()
        .describe('AI provider to use'),
      model: z.string().optional().describe('Specific model to use'),
      
      // Workflow fields
      stepNumber: z.number().min(1).default(1).describe('Current step in the planning workflow'),
      totalSteps: z.number().min(1).default(5).describe('Estimated total steps needed'),
      currentStep: z.string().default('').describe('Current planning step content'),
      nextStepRequired: z.boolean().default(true).describe('Whether another step is needed'),
      
      // Planning-specific fields
      isRevision: z.boolean().default(false).describe('True if this step revises a previous step'),
      revisingStep: z.number().optional().describe('Which step number is being revised'),
      isBranching: z.boolean().default(false).describe('True if exploring alternative approach'),
      branchingFrom: z.number().optional().describe('Which step to branch from'),
      branchId: z.string().optional().describe('Identifier for this planning branch'),
    });
  • src/server.ts:425-433 (registration)
    Registers the 'ultra-plan' tool with the MCP server, linking to the AdvancedToolsHandler.handlePlan method and using PlanSchema for input validation.
    server.registerTool("ultra-plan", {
      title: "Ultra Plan",
      description: "Multi-step feature planning with revisions and branches",
      inputSchema: PlanSchema.shape,
    }, async (args) => {
      const { AdvancedToolsHandler } = await import("./handlers/advanced-tools");
      const handler = new AdvancedToolsHandler();
      return await handler.handlePlan(args);
    });
  • Switch case in AdvancedToolsHandler.handle() method that routes 'ultra-plan' calls to the handlePlan implementation.
    case 'ultra-plan':
      return await this.handlePlan(params.arguments);
  • src/server.ts:872-890 (registration)
    Registers the prompt version of 'ultra-plan' for MCP compatibility.
    server.registerPrompt("ultra-plan", {
      title: "Ultra Feature Planning",
      description: "Advanced multi-step feature planning with revisions and branches",
      argsSchema: {
        task: z.string(),
        requirements: z.string().optional(),
        scope: z.string().optional(),
        stepNumber: z.string(),
        totalSteps: z.string(),
      },
    }, (args) => ({
      messages: [{
        role: "user",
        content: {
          type: "text",
          text: `Plan this feature comprehensively: ${args.task}${args.requirements ? `\n\nRequirements: ${args.requirements}` : ''}${args.scope ? ` (scope: ${args.scope})` : ''} (Step ${args.stepNumber} of ${args.totalSteps})`
        }
      }]
    }));
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. It mentions 'multi-step feature planning with revisions and branches' which suggests iterative workflow capabilities, but doesn't describe what the tool actually produces (e.g., a plan document, structured output), how revisions/branches are managed, whether it's stateful, or any limitations. The description is too vague to understand the tool's actual behavior.

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 a single, efficient phrase that communicates the core concept without unnecessary words. However, it's arguably too concise given the tool's complexity - a 14-parameter planning tool with workflow capabilities might benefit from slightly more elaboration about what 'planning' entails.

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 complex tool with 14 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool produces, how the multi-step workflow operates, what 'revisions and branches' mean in practice, or how this differs from similar planning tools. The combination of complexity and lack of structured documentation makes the current description inadequate.

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 14 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. The baseline score of 3 reflects adequate parameter documentation through the schema alone, though the description contributes nothing extra.

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 'Multi-step feature planning with revisions and branches' states a general purpose but lacks specificity about what the tool actually does (e.g., generates plans, modifies existing ones). It distinguishes from some siblings like 'analyze-code' or 'debug-issue' by focusing on planning, but doesn't clearly differentiate from 'plan-feature' or 'planner' which appear to serve similar functions.

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?

No guidance is provided on when to use this tool versus alternatives like 'plan-feature' or 'planner' in the sibling list. The description implies a multi-step workflow with revisions and branches, but doesn't specify appropriate contexts, prerequisites, or exclusions for its use.

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/RealMikeChong/ultra-mcp'

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