Skip to main content
Glama
agilesix

VA Form Generation MCP Server

by agilesix

audit_form

Audit scaffolded VA forms to generate comprehensive fix reports that ensure compliance with 21P-601 best practices and VA.gov content standards.

Instructions

Audit a scaffolded VA form and generate comprehensive fix report following 21P-601 best practices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
form_numberYesVA form number (e.g., "21p-0516")
workspace_pathYesPath to vets-website workspace
pdf_pathNoOptional: Path to form PDF for accuracy verification

Implementation Reference

  • Handler for the 'audit_form' tool that verifies form directory existence, identifies the associated PDF, and generates a detailed audit/action report.
        case 'audit_form': {
          const { form_number, workspace_path, pdf_path } = args;
          const formPath = path.join(workspace_path, 'src/applications/simple-forms', form_number);
    
          // Check if form exists
          try {
            await fs.access(formPath);
          } catch {
            return {
              content: [
                {
                  type: 'text',
                  text: `❌ Form directory not found: ${formPath}\n\nMake sure the form has been scaffolded first.`,
                },
              ],
            };
          }
    
          // Find PDF if not provided
          let pdfLocation = pdf_path;
          if (!pdfLocation) {
            try {
              const files = await fs.readdir(formPath);
              const pdfFile = files.find(f => f.endsWith('.pdf'));
              if (pdfFile) {
                pdfLocation = path.join(formPath, pdfFile);
              }
            } catch (e) {
              pdfLocation = '[PDF not found]';
            }
          }
    
          const report = `# VA Form ${form_number} Audit Report
    
    ## Form Information
    - **Form Number:** ${form_number}
    - **Form Path:** ${formPath}
    - **PDF File:** ${pdfLocation}
    - **Reference Form:** src/applications/simple-forms/21p-601/
    
    ## Recommended Actions
    
    ### 1. Launch Parallel Agents (Run simultaneously)
    
    **Agent 1: Component Pattern Auditor**
    - Type: Explore agent (medium thoroughness)
    - Scope: All files in pages/
    - Finds: yesNoUI patterns, import paths, radioSchema issues, duplicate imports
    
    **Agent 2: Architecture Compliance**
    - Type: General-Purpose agent
    - Scope: Core files (IntroductionPage, ConfirmationPage, transformers, form.js)
    - Fixes: All architecture anti-patterns
    
    **Agent 3: Plain Language & PDF Accuracy**
    - Type: General-Purpose agent
    - Scope: All user-facing content and PDF comparison
    - Fixes: Content, labels, plain language issues
    
    ### 2. Sequential Validation
    
    **Agent 4: Integration Validator**
    - Type: General-Purpose agent (runs AFTER agents 1-3 complete)
    - Validates: Schema, syntax, loading, conditional logic
    
    ## Quick Start Command
    
    \`\`\`
    Launch agents 1, 2, 3 in parallel for form ${form_number}:
    - Form path: ${formPath}
    - PDF path: ${pdfLocation}
    - Execute as described in master checklist
    \`\`\`
    
    ## Expected Fixes
    
    ✅ Component patterns (6 fixes)
    ✅ Architecture (5 fixes)
    ✅ Content & accuracy (3 fixes)
    ✅ Syntax (2 fixes)
    
    **Total: 16+ automated fixes**
    `;
    
          return {
            content: [
              {
                type: 'text',
                text: report,
              },
            ],
          };
        }
  • index.js:48-69 (registration)
    Registration of 'audit_form' tool with its description and input schema.
    {
      name: 'audit_form',
      description: 'Audit a scaffolded VA form and generate comprehensive fix report following 21P-601 best practices',
      inputSchema: {
        type: 'object',
        properties: {
          form_number: {
            type: 'string',
            description: 'VA form number (e.g., "21p-0516")',
          },
          workspace_path: {
            type: 'string',
            description: 'Path to vets-website workspace',
          },
          pdf_path: {
            type: 'string',
            description: 'Optional: Path to form PDF for accuracy verification',
          },
        },
        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