Skip to main content
Glama

Plan Feature

plan-feature

Plan feature implementation with step-by-step approach using AI to break down tasks, define requirements, and establish scope for development projects.

Instructions

Plan feature implementation with step-by-step approach

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesWhat to plan (e.g., 'add user profiles', 'implement payment system')
requirementsNoSpecific requirements or constraints
scopeNoPlanning scopestandard
providerNoAI provider to usegemini

Implementation Reference

  • src/server.ts:314-322 (registration)
    Registration of the 'plan-feature' MCP tool, specifying title, description, input schema, and handler delegation to AIToolHandlers.handlePlanFeature
    // Register plan-feature tool
    server.registerTool("plan-feature", {
      title: "Plan Feature",
      description: "Plan feature implementation with step-by-step approach",
      inputSchema: PlanFeatureSchema.shape,
    }, async (args) => {
      const aiHandlers = await getHandlers();
      return await aiHandlers.handlePlanFeature(args);
    });
  • Core handler implementation in AIToolHandlers class. Selects AI provider, constructs specialized system prompt for feature planning based on scope, generates response via provider.generateText, and formats output for MCP protocol.
    async handlePlanFeature(params: z.infer<typeof PlanFeatureSchema>) {
      // Use provided provider or get the preferred one (Azure if configured)
      const providerName = params.provider || (await this.providerManager.getPreferredProvider(['openai', 'gemini', 'azure', 'grok']));
      const provider = await this.providerManager.getProvider(providerName);
      
      const scopePrompts = {
        minimal: "Provide a basic implementation plan with essential components only",
        standard: "Provide a detailed implementation plan with proper architecture and considerations",
        comprehensive: "Provide an extensive implementation plan with full architecture, testing, documentation, and deployment considerations"
      };
    
      const systemPrompt = `You are an expert software architect and project planner. Create detailed implementation plans for features.
      ${scopePrompts[params.scope]}
      
      Include in your plan:
      - Feature breakdown and components
      - Implementation steps and timeline
      - Technical considerations and dependencies
      - Testing and validation approach
      - Potential challenges and mitigation strategies
      
      Be practical and actionable in your planning.`;
    
      let prompt = `Plan the following feature: ${params.task}`;
      if (params.requirements) {
        prompt += `\n\nRequirements: ${params.requirements}`;
      }
    
      const response = await provider.generateText({
        prompt,
        systemPrompt,
        temperature: 0.6, // Moderate temperature for creative planning
        reasoningEffort: providerName === "openai" || providerName === "azure" ? "medium" : undefined,
        useSearchGrounding: providerName === "gemini",
      });
    
      return {
        content: [
          {
            type: "text",
            text: response.text,
          },
        ],
        metadata: {
          provider: providerName,
          model: response.model,
          scope: params.scope,
          usage: response.usage,
          ...response.metadata,
        },
      };
    }
  • Zod input schema definition for 'plan-feature' tool used in server.registerTool inputSchema: PlanFeatureSchema.shape
    const PlanFeatureSchema = 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"),
      provider: z.enum(["openai", "gemini", "azure", "grok"]).optional().default("gemini").describe("AI provider to use"),
    });
  • Zod schema used for TypeScript typing of handlePlanFeature params (z.infer<typeof PlanFeatureSchema>)
    const PlanFeatureSchema = 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"),
      provider: z.enum(["openai", "gemini", "azure", "grok"]).optional().default("gemini").describe("AI provider to use"),
    });
  • getHandlers function lazily initializes and returns AIToolHandlers instance (containing handlePlanFeature), used by all tool registrations including plan-feature
    async function getHandlers() {
      if (!handlers) {
        const { ConfigManager } = require("./config/manager");
        const { ProviderManager } = require("./providers/manager");
        const { AIToolHandlers } = require("./handlers/ai-tools");
        
        const configManager = new ConfigManager();
        
        // Load config and set environment variables
        const config = await configManager.getConfig();
        if (config.openai?.apiKey) {
          process.env.OPENAI_API_KEY = config.openai.apiKey;
        }
        if (config.openai?.baseURL) {
          process.env.OPENAI_BASE_URL = config.openai.baseURL;
        }
        if (config.google?.apiKey) {
          process.env.GOOGLE_API_KEY = config.google.apiKey;
        }
        if (config.google?.baseURL) {
          process.env.GOOGLE_BASE_URL = config.google.baseURL;
        }
        if (config.azure?.apiKey) {
          process.env.AZURE_API_KEY = config.azure.apiKey;
        }
        if (config.azure?.baseURL) {
          process.env.AZURE_BASE_URL = config.azure.baseURL;
        }
        if (config.xai?.apiKey) {
          process.env.XAI_API_KEY = config.xai.apiKey;
        }
        if (config.xai?.baseURL) {
          process.env.XAI_BASE_URL = config.xai.baseURL;
        }
        
        providerManager = new ProviderManager(configManager);
        handlers = new AIToolHandlers(providerManager);
      }
      
      return handlers;
    }
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 of behavioral disclosure. It mentions 'step-by-step approach' but doesn't explain what that entails—e.g., whether it generates a detailed plan, requires specific inputs beyond the schema, or has limitations like rate constraints. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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: 'Plan feature implementation with step-by-step approach.' It's front-loaded with the core purpose and wastes no words, making it highly concise and well-structured for quick understanding.

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?

Given the complexity of a planning tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, output format, and usage context, leaving the agent with insufficient information to effectively invoke the tool beyond basic parameter input.

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 description adds no parameter-specific information beyond what the schema provides. Since schema description coverage is 100%, the baseline score is 3. The description doesn't clarify how parameters like 'scope' or 'provider' affect the planning process, so it doesn't compensate for potential gaps in schema semantics.

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 tool's purpose: 'Plan feature implementation with step-by-step approach.' It specifies the verb ('Plan') and resource ('feature implementation'), making it understandable. However, it doesn't explicitly differentiate from sibling tools like 'planner' or 'ultra-plan,' which appear related.

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. With siblings like 'planner' and 'ultra-plan' present, there's no indication of context, prerequisites, or exclusions. Usage is implied by the name but not explicitly stated.

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