Skip to main content
Glama

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 ];

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