Skip to main content
Glama
kingdomseed

Structured Workflow MCP

by kingdomseed

audit_inventory_guidance

Analyze code changes and catalog modifications during the audit inventory phase to maintain structured development workflows.

Instructions

Get guidance for the AUDIT_INVENTORY phase - analyze code and catalog changes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool dispatcher switch case that handles the 'audit_inventory_guidance' tool call by invoking handlePhaseGuidance
    case 'setup_guidance':
    case 'audit_inventory_guidance':
    case 'compare_analyze_guidance':
    case 'question_determine_guidance':
    case 'refactor_guidance':
    case 'lint_guidance':
    case 'iterate_guidance':
    case 'present_guidance':
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(await handlePhaseGuidance(name, sessionManager), null, 2)
        }]
      };
  • Main handler function for phase guidance tools, including audit_inventory_guidance. Routes to suggestive or directive mode based on session.
    export async function handlePhaseGuidance(
      phaseName: string,
      sessionManager: SessionManager
    ): Promise<PhaseGuidance> {
      const session = sessionManager.getSession();
      const isDirectiveMode = session?.workflowConfig !== undefined;
      
      // Route to appropriate guidance based on mode
      if (isDirectiveMode) {
        return getDirectiveGuidance(phaseName, sessionManager);
      } else {
        return getSuggestiveGuidance(phaseName, sessionManager);
      }
    }
  • Core guidance content returned by the handler for audit_inventory_guidance in suggestive (non-directive) mode.
    audit_inventory_guidance: {
      phase: 'AUDIT_INVENTORY',
      objective: 'Thoroughly analyze the codebase AND catalog all required changes',
      instructions: [
        '--- AUDIT PHASE (Analysis) ---',
        'Use your file reading tools to examine all relevant code',
        'Use your search tools to find patterns, dependencies, and references',
        'Map out the current implementation and data flow',
        'Identify code quality issues and improvement opportunities',
        '--- INVENTORY PHASE (Cataloging) ---',
        'List every file that needs to be modified',
        'For each file, specify exactly what changes are needed',
        'Assess the impact and risks of each change',
        'Create a priority order for implementation',
        'DO NOT modify any files during this combined phase'
      ],
      suggestedApproach: [
        'AUDIT: Start by reading the main files mentioned in the task',
        'AUDIT: Search for all references to key functions or classes',
        'AUDIT: Trace the flow of data through the system',
        'AUDIT: Document dependencies and potential impact areas',
        'INVENTORY: Based on your audit, list all required changes',
        'INVENTORY: Group related changes together',
        'INVENTORY: Identify which changes have dependencies',
        'INVENTORY: Consider what could break and plan accordingly'
      ],
      importantNotes: [
        'This combined phase gives you a complete understanding before any changes',
        'The audit informs the inventory - they work together',
        'Take detailed notes using any format (text, diagrams, etc.)',
        'The more thorough your analysis and cataloging, the smoother the implementation',
        '⚠️ CRITICAL: You MUST create documentation following the numbered pattern (01-audit-analysis.md, 01-inventory-changes.json)',
        '⚠️ CRITICAL: When using phase_output, you MUST provide the outputArtifacts array with actual content you created'
      ],
      expectedOutput: {
        // Audit outputs
        filesAnalyzed: 'Complete list of files examined',
        dependencies: 'Map of dependencies and imports',
        currentFlow: 'How the current implementation works',
        issues: 'Any problems or code smells identified',
        // Inventory outputs
        changesList: 'Detailed list of all modifications needed',
        fileToChangesMap: 'Map of files to specific changes',
        impactAnalysis: 'What each change affects',
        risks: 'Potential issues or breaking changes',
        priority: 'Suggested order of implementation'
      },
      nextPhase: 'After completing analysis and cataloging, use compare_analyze_guidance. REMEMBER: You cannot proceed to the next phase without calling phase_output with actual outputArtifacts (01-audit-analysis.md, 01-inventory-changes.json)'
    },
  • Tool schema definition (name, description, inputSchema) for audit_inventory_guidance
    {
      name: 'audit_inventory_guidance',
      description: 'Get guidance for the AUDIT_INVENTORY phase - analyze code and catalog changes',
      inputSchema: { type: 'object', properties: {} }
    },
  • src/index.ts:137-157 (registration)
    Registration of all MCP tools, including spreading the phase guidance tools (which includes audit_inventory_guidance) into the tools array.
    const tools = [
      // Workflow entry points
      createRefactorWorkflowTool(),                 // Refactoring workflow
      createFeatureWorkflowTool(),                  // Feature creation workflow
      createTestWorkflowTool(),                     // Test writing workflow
      createTddWorkflowTool(),                      // TDD workflow
      createBuildCustomWorkflowTool(),              // Custom workflow builder
      
      // Phase guidance tools
      ...createPhaseGuidanceTools(),                // Handles both suggestive and directive modes
      createTestGuidanceTool(),                     // TEST phase guidance
      
      // Validation tools
      ...createValidationTools(),                   // Both validate_action and validate_phase_completion
      
      // Workflow management
      createUserInputRequiredTool(),                // Escalation handling
      createWorkflowStatusTool(),                   // Workflow status
      createPhaseOutputTool(),                      // Phase output recording
      createDiscoverWorkflowToolsTool()             // Tool discovery
    ];
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. It states the tool 'gets guidance' but doesn't specify what form this guidance takes (e.g., text, structured data), whether it's static or dynamic, or any operational constraints like permissions or rate limits. The description is too vague to inform the agent about how the tool behaves beyond its basic purpose.

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 that front-loads the key information ('Get guidance for the AUDIT_INVENTORY phase') and adds clarifying detail ('analyze code and catalog changes'). There is no wasted text, and it's structured to immediately convey the tool's core function.

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 implied by 'analyze code and catalog changes' and the lack of annotations and output schema, the description is incomplete. It doesn't explain what the guidance output looks like, how it's generated, or any behavioral nuances. For a tool that seems to provide analysis guidance, more detail on the nature and format of the guidance is needed to be fully helpful to an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter details, and it appropriately doesn't mention any. This meets the baseline for tools with no parameters, as there's nothing to compensate for.

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 action ('Get guidance') and the specific context ('for the AUDIT_INVENTORY phase'), with the purpose being to 'analyze code and catalog changes'. It distinguishes itself from siblings by focusing on a specific phase, though it doesn't explicitly differentiate from similar guidance tools like 'compare_analyze_guidance' or 'iterate_guidance'.

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 implies usage during the 'AUDIT_INVENTORY phase' but provides no explicit guidance on when to use this tool versus alternatives like 'compare_analyze_guidance' or 'iterate_guidance'. There are no prerequisites, exclusions, or comparisons mentioned, leaving the agent to infer context from the phase name alone.

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/kingdomseed/structured-workflow-mcp'

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