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'],
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the tool audits and generates a fix report, implying a read-only analysis, but doesn't disclose behavioral traits like whether it modifies files, requires specific permissions, has rate limits, or what the output format entails. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 a single, efficient sentence that front-loads key actions ('Audit' and 'generate'). It avoids redundancy and wastes no words, though it could be slightly more structured by separating purpose from output details.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what a 'comprehensive fix report' includes, how results are returned, or any error handling. For a tool with 3 parameters and complex auditing functionality, more context is needed to guide the agent effectively.

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 fully documents parameters. The description adds no additional meaning beyond implying 'form_number' and 'workspace_path' are used for auditing, and 'pdf_path' for 'accuracy verification'. This meets the baseline of 3 since the schema handles parameter documentation adequately.

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 ('Audit') and resource ('scaffolded VA form'), and specifies the output ('comprehensive fix report') and standard ('21P-601 best practices'). It distinguishes from siblings like 'validate_form' by focusing on auditing and generating fix reports rather than just validation. However, it doesn't explicitly contrast with all siblings (e.g., 'get_fix_reference').

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 provides no guidance on when to use this tool versus alternatives like 'validate_form' or 'get_fix_reference'. It mentions 'scaffolded VA form' but doesn't clarify prerequisites, exclusions, or specific contexts. Without usage context, the agent must infer based on tool names 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/agilesix/va-form-generation-mcp'

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