Skip to main content
Glama

validate_all_accessibility

Run comprehensive accessibility tests using Axe and WAVE to identify WCAG compliance issues on websites for improved user experience.

Instructions

Run all accessibility tests (Axe + optionally WAVE if API key provided).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
waveApiKeyNoOptional WAVE API key
wcagLevelNoWCAG level for Axe

Implementation Reference

  • Core handler function implementing 'validate_all_accessibility' tool. Runs Axe accessibility analysis always, and WAVE if API key provided. Aggregates results and counts total violations.
    export async function runAllAccessibility( url: string, options: AccessibilityTestOptions = {} ): Promise<AllAccessibilityResult> { const results: AllAccessibilityResult = { url, timestamp: new Date().toISOString(), summary: { tools_run: [], total_violations: 0, }, }; // Always run Axe (free, open source) results.axe = await analyzeAxe(url, options.axe || {}); results.summary.tools_run.push('axe'); results.summary.total_violations += results.axe.violations; // Optional: WAVE (requires API key) if (options.wave?.apiKey) { results.wave = await analyzeWAVE(url, options.wave); results.summary.tools_run.push('wave'); results.summary.total_violations += results.wave.errors + results.wave.contrast_errors; } return results; }
  • index.ts:248-258 (registration)
    MCP tool registration including name, description, and input schema definition.
    name: 'validate_all_accessibility', description: 'Run all accessibility tests (Axe + optionally WAVE if API key provided).', inputSchema: { type: 'object', properties: { url: { type: 'string' }, waveApiKey: { type: 'string', description: 'Optional WAVE API key' }, wcagLevel: { type: 'string', description: 'WCAG level for Axe' }, }, required: ['url'], },
  • MCP server request handler switch case for the tool, validates arguments and delegates to runAllAccessibility.
    case 'validate_all_accessibility': { const validatedArgs = AllAccessibilityArgsSchema.parse(args); const result = await runAllAccessibility(validatedArgs.url, { wave: validatedArgs.waveApiKey ? { apiKey: validatedArgs.waveApiKey } : undefined, axe: { wcagLevel: validatedArgs.wcagLevel }, }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
  • Zod schema for input validation of the tool arguments.
    const AllAccessibilityArgsSchema = z.object({ url: z.string().url(), waveApiKey: z.string().optional(), wcagLevel: z.string().optional(), });
  • TypeScript interface defining options for accessibility tests.
    export interface AccessibilityTestOptions { wave?: { apiKey: string }; axe?: { wcagLevel?: string }; }

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/cordlesssteve/webby-mcp'

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