Skip to main content
Glama

interactive_adr_planning

Guide users through structured decision-making to create architectural decision records with research integration, option evaluation, and automatic ADR generation.

Instructions

Interactive guided ADR planning and creation tool - walks users through structured decision-making process with research integration, option evaluation, and automatic ADR generation. TIP: Start by reading @.mcp-server-context.md to understand project context and previous decisions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesInteractive planning operation to perform
sessionIdNoPlanning session ID (required for all operations except start_session)
inputNoUser input for the current phase (varies by phase)
projectPathYesProject root path
autoResearchNoAutomatically trigger research when needed
generateTodosNoAutomatically generate TODO items from decisions

Implementation Reference

  • Main exported handler function `interactiveAdrPlanning` that validates input with schema and dispatches to operation-specific handlers (startSession, continueSession, provideInput, etc.). Orchestrates the entire interactive ADR planning workflow.
    export async function interactiveAdrPlanning(args: any): Promise<any> {
      try {
        const input = InteractiveAdrPlanningSchema.parse(args);
    
        switch (input.operation) {
          case 'start_session':
            return await startSession(input);
    
          case 'continue_session':
            return await continueSession(input);
    
          case 'provide_input':
            return await provideInput(input);
    
          case 'request_research':
            return await requestResearch(input);
    
          case 'evaluate_options':
            return await evaluateOptions(input);
    
          case 'make_decision':
            input.input = { selectedOption: input.input };
            return await provideInput(input);
    
          case 'assess_impact':
            input.input = { impacts: input.input };
            return await provideInput(input);
    
          case 'plan_implementation':
            input.input = { implementation: input.input };
            return await provideInput(input);
    
          case 'generate_adr':
            return await provideInput(input);
    
          case 'update_todos':
            return await updateTodos(input);
    
          case 'get_guidance':
            return await getGuidance(input);
    
          case 'save_session': {
            const session = sessions.get(input.sessionId!);
            if (!session) throw new McpAdrError('Session not found', 'SESSION_NOT_FOUND');
            await saveSession(session);
            return { success: true, message: 'Session saved' };
          }
    
          case 'complete_session':
            return await completeSession(input);
    
          default:
            throw new McpAdrError(`Unknown operation: ${input.operation}`, 'INVALID_OPERATION');
        }
      } catch (error) {
        if (error instanceof McpAdrError) {
          throw error;
        }
        throw new McpAdrError(
          `Interactive ADR planning failed: ${error instanceof Error ? error.message : String(error)}`,
          'PLANNING_ERROR'
        );
      }
    }
  • Primary Zod input schema defining all supported operations and parameters for the interactive ADR planning tool.
    const InteractiveAdrPlanningSchema = z.object({
      operation: z.enum([
        'start_session',
        'continue_session',
        'provide_input',
        'request_research',
        'evaluate_options',
        'make_decision',
        'assess_impact',
        'plan_implementation',
        'generate_adr',
        'update_todos',
        'get_guidance',
        'save_session',
        'complete_session',
      ]),
      sessionId: z.string().optional(),
      input: z.any().optional(),
      projectPath: z.string(),
      autoResearch: z.boolean().default(true).describe('Automatically trigger research when needed'),
      generateTodos: z
        .boolean()
        .default(true)
        .describe('Automatically generate TODO items from decisions'),
    });
  • Central tool catalog registration defining metadata, category ('adr'), complexity, token cost estimates, related tools, and JSON input schema for MCP tool discovery and listing.
    TOOL_CATALOG.set('interactive_adr_planning', {
      name: 'interactive_adr_planning',
      shortDescription: 'Interactive ADR planning session',
      fullDescription:
        'Guides through an interactive ADR planning session to identify and prioritize decisions.',
      category: 'adr',
      complexity: 'complex',
      tokenCost: { min: 3000, max: 6000 },
      hasCEMCPDirective: true, // Phase 4.2: CE-MCP directive added
      relatedTools: ['suggest_adrs', 'generate_adr_from_decision'],
      keywords: ['adr', 'planning', 'interactive', 'session'],
      requiresAI: true,
      inputSchema: {
        type: 'object',
        properties: {
          projectPath: { type: 'string' },
          sessionMode: { type: 'string', enum: ['guided', 'free-form'] },
        },
        required: ['projectPath'],
      },
    });
  • CE-MCP directive registration in getCEMCPDirective switch statement, providing optimized orchestration directive version of the tool.
    case 'interactive_adr_planning':
      return createInteractiveAdrPlanningDirective(
        args as unknown as CEMCPInteractiveAdrPlanningArgs
      );
  • Internal PlanningSessionSchema used for session state persistence, including phases, context (problem, options, decisions), and metadata. Critical for multi-turn interactive workflow.
    const PlanningSessionSchema = z.object({
      sessionId: z.string(),
      phase: z.enum([
        'problem_definition',
        'research_analysis',
        'option_exploration',
        'decision_making',
        'impact_assessment',
        'implementation_planning',
        'adr_generation',
        'completed',
      ]),
      context: z.object({
        projectPath: z.string(),
        adrDirectory: z.string().default('docs/adrs'),
        problemStatement: z.string().optional(),
        researchFindings: z
          .array(
            z.object({
              source: z.string(),
              insight: z.string(),
              relevance: z.string(),
            })
          )
          .default([]),
        options: z
          .array(
            z.object({
              name: z.string(),
              description: z.string(),
              pros: z.array(z.string()),
              cons: z.array(z.string()),
              risks: z.array(z.string()),
              effort: z.enum(['low', 'medium', 'high']),
              confidence: z.number().min(0).max(100),
            })
          )
          .default([]),
        selectedOption: z
          .object({
            name: z.string(),
            rationale: z.string(),
            tradeoffs: z.array(z.string()),
          })
          .optional(),
        impacts: z
          .object({
            technical: z.array(z.string()).default([]),
            business: z.array(z.string()).default([]),
            team: z.array(z.string()).default([]),
            risks: z.array(z.string()).default([]),
            dependencies: z.array(z.string()).default([]),
          })
          .optional(),
        implementation: z
          .object({
            phases: z.array(z.string()).default([]),
            tasks: z
              .array(
                z.object({
                  description: z.string(),
                  priority: z.enum(['low', 'medium', 'high', 'critical']),
                  effort: z.string(),
                  assignee: z.string().optional(),
                })
              )
              .default([]),
            timeline: z.string().optional(),
            successCriteria: z.array(z.string()).default([]),
          })
          .optional(),
        adrContent: z.string().optional(),
      }),
      metadata: z.object({
        createdAt: z.string(),
        updatedAt: z.string(),
        lastAction: z.string(),
        nextSteps: z.array(z.string()).default([]),
      }),
    });
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 the interactive, guided process and automatic generation features, but doesn't cover critical aspects like whether this tool creates persistent sessions, requires specific permissions, has rate limits, or what happens on session completion. For a complex tool with 6 parameters and multiple operations, this leaves significant behavioral gaps.

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 appropriately concise with two sentences: the first clearly states the tool's purpose and key features, the second provides a helpful tip. No wasted words, though the TIP could be integrated more seamlessly. Good front-loading of core functionality.

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?

Given the tool's complexity (6 parameters, 13 operation types, no output schema, no annotations), the description is minimally adequate. It explains the interactive planning purpose but doesn't address return values, error conditions, or how the different operations interact. The TIP about context helps, but more completeness is needed for such a multifaceted tool.

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 6 parameters thoroughly with descriptions and enum values for 'operation'. The description adds no specific parameter semantics beyond implying the tool uses these parameters for interactive planning. This meets the baseline of 3 when schema does heavy lifting, but adds minimal extra value.

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 as 'Interactive guided ADR planning and creation tool' with specific functions like 'walks users through structured decision-making process with research integration, option evaluation, and automatic ADR generation.' It distinguishes from siblings like 'generate_adr_from_decision' by emphasizing the interactive, guided nature. However, it doesn't explicitly contrast with all similar tools like 'mcp_planning' or 'troubleshoot_guided_workflow'.

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?

The description provides implied usage guidance through the TIP about reading context documentation, suggesting this tool is for comprehensive ADR planning sessions. However, it lacks explicit when-to-use criteria versus alternatives like 'generate_adr_bootstrap' or 'validate_adr', and doesn't mention prerequisites or exclusions. The guidance is helpful but not comprehensive.

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/tosin2013/mcp-adr-analysis-server'

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