Skip to main content
Glama
agilesix

VA Form Generation MCP Server

by agilesix

generate_orchestration_prompt

Create orchestration prompts to launch agents for auditing and fixing VA forms according to VA.gov standards and best practices.

Instructions

Generate the full orchestration prompt to launch all 4 agents

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
form_numberYesVA form number
workspace_pathYesPath to vets-website workspace
pdf_pathNoPath to PDF file

Implementation Reference

  • The handler function for 'generate_orchestration_prompt' which constructs the agent execution orchestration guide.
        case 'generate_orchestration_prompt': {
          const { form_number, workspace_path, pdf_path } = args;
          const formPath = path.join(workspace_path, 'src/applications/simple-forms', form_number);
    
          const orchestrationPrompt = `# VA Form ${form_number} - Orchestration Prompt
    
    Execute the 4-agent plan to audit and fix this form following 21P-601 best practices.
    
    ## Form Information
    - **Form Number:** ${form_number}
    - **Form Path:** ${formPath}
    - **PDF Path:** ${pdf_path || 'Auto-detect from form directory'}
    - **Reference:** src/applications/simple-forms/21p-601/
    
    ## Agent Execution Plan
    
    ### Phase 1: Launch 3 Agents in PARALLEL
    
    Use a **single message with 3 Task tool calls** to launch these agents simultaneously:
    
    #### Agent 1: Component Pattern Auditor
    - **Type:** Explore agent
    - **Thoroughness:** medium
    - **Task:** Search all files in ${formPath}/pages/ for:
      - Complex yesNoUI patterns (should be simple form)
      - Old import paths (should be 'platform/forms-system/src/js/web-component-patterns')
      - Uncalled radioSchema (should be radioSchema([...]))
      - Duplicate imports
    - **Deliverable:** List of files to fix with specific issues
    
    #### Agent 2: Architecture Compliance
    - **Type:** General-Purpose agent
    - **Task:** Audit and rewrite core architecture files:
      - containers/IntroductionPage.jsx (content structure, OMB info from PDF)
      - containers/ConfirmationPage.jsx (use ConfirmationView component)
      - config/submit-transformer.js (21P-601 pattern with helpers)
      - config/prefill-transformer.js (access user profile from state)
      - config/form.js (add prefillEnabled, savedFormMessages, fullNamePath)
    - **Deliverable:** Rewritten files following 21P-601 patterns
    
    #### Agent 3: Plain Language & PDF Accuracy
    - **Type:** General-Purpose agent
    - **Task:**
      - Read PDF at ${pdf_path || formPath + '/*.pdf'} to understand form purpose
      - Verify all field labels match PDF exactly
      - Check VA.gov plain language standards (conversational tone, you/we pronouns)
      - Fix person-centered title (e.g., "Verify your..." not "Report for VA")
      - Fix apostrophe syntax (use double quotes)
    - **Deliverable:** Updated content following VA.gov standards
    
    ### Phase 2: Wait for Agents 1-3 to Complete
    
    ### Phase 3: Launch Agent 4 SEQUENTIALLY
    
    After agents 1-3 finish, launch Agent 4:
    
    #### Agent 4: Integration Validator
    - **Type:** General-Purpose agent
    - **Task:**
      - Run schema validation (grep for uncalled radioSchema)
      - Check apostrophe syntax
      - Verify form loads without errors
      - Validate conditional logic matches PDF
      - Report any remaining issues
    - **Deliverable:** Validation report with any outstanding issues
    
    ## Expected Results
    
    After completion, the form should have:
    - ✅ No schema validation errors
    - ✅ All components use 21P-601 patterns
    - ✅ IntroductionPage with proper structure and OMB info
    - ✅ ConfirmationPage using ConfirmationView
    - ✅ Transformers following 21P-601 pattern
    - ✅ form.js with fullNamePath (enables signature)
    - ✅ All content follows VA plain language
    - ✅ Field labels match PDF exactly
    - ✅ No apostrophe syntax errors
    
    ## Begin Execution
    
    Launch agents 1, 2, 3 in parallel now (single message with 3 Task calls).
    `;
    
          return {
            content: [
              {
                type: 'text',
                text: orchestrationPrompt,
              },
            ],
          };
        }
  • index.js:135-155 (registration)
    Registration block for the 'generate_orchestration_prompt' tool in the MCP server.
      name: 'generate_orchestration_prompt',
      description: 'Generate the full orchestration prompt to launch all 4 agents',
      inputSchema: {
        type: 'object',
        properties: {
          form_number: {
            type: 'string',
            description: 'VA form number',
          },
          workspace_path: {
            type: 'string',
            description: 'Path to vets-website workspace',
          },
          pdf_path: {
            type: 'string',
            description: 'Path to PDF file',
          },
        },
        required: ['form_number', 'workspace_path'],
      },
    },

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/agilesix/va-form-generation-mcp'

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