Skip to main content
Glama
agilesix

VA Form Generation MCP Server

by agilesix

validate_form

Validate VA forms for schema compliance, syntax errors, and apostrophe usage to ensure adherence to VA.gov content standards and best practices.

Instructions

Run validation checks on a form (schema, syntax, apostrophes)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
form_pathYesPath to form directory
check_typesYesTypes of checks to run

Implementation Reference

  • The handler for the 'validate_form' tool, which runs various validation checks (schema, apostrophes, imports, syntax) based on user input.
    case 'validate_form': {
      const { form_path, check_types } = args;
      const checks = check_types.includes('all')
        ? ['schema', 'syntax', 'apostrophes', 'imports']
        : check_types;
    
      const results = [];
    
      for (const checkType of checks) {
        switch (checkType) {
          case 'schema':
            results.push('## Schema Validation\n\nCommand to find uncalled radioSchema:\n```bash\ngrep -rn ": radioSchema[,\\s]" ' + form_path + '/pages/\n```');
            break;
          case 'apostrophes':
            results.push('## Apostrophe Syntax Check\n\nCommand to find strings with apostrophes:\n```bash\ngrep -rn "\'\\w.*\'\\w.*\'" ' + form_path + '/ --include="*.js" --include="*.jsx"\n```');
            break;
          case 'imports':
            results.push('## Import Path Check\n\nCommand to find old import paths:\n```bash\ngrep -rn "web-component-patterns/" ' + form_path + '/\n```');
            break;
          case 'syntax':
            results.push('## Syntax Validation\n\nCommand to run linter:\n```bash\nnpm run lint -- ' + form_path + '/\n```');
            break;
        }
      }
    
      return {
        content: [
          {
            type: 'text',
            text: '# Validation Report\n\n' + results.join('\n\n'),
          },
        ],
      };
    }
  • index.js:98-118 (registration)
    The tool registration for 'validate_form' in the ListToolsRequestSchema handler.
      name: 'validate_form',
      description: 'Run validation checks on a form (schema, syntax, apostrophes)',
      inputSchema: {
        type: 'object',
        properties: {
          form_path: {
            type: 'string',
            description: 'Path to form directory',
          },
          check_types: {
            type: 'array',
            items: {
              type: 'string',
              enum: ['schema', 'syntax', 'apostrophes', 'imports', 'all'],
            },
            description: 'Types of checks to run',
          },
        },
        required: ['form_path', 'check_types'],
      },
    },

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