Skip to main content
Glama

validate_all_accessibility

Run comprehensive accessibility tests using Axe and optional WAVE integration to identify WCAG compliance issues and improve website accessibility for all users.

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 that implements 'validate_all_accessibility' by orchestrating Axe (always) and optional WAVE accessibility tests, aggregating violations.
    /** * Run all accessibility tests */ 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; }
  • MCP server tool dispatch handler case for 'validate_all_accessibility', validates args 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) }] }; }
  • index.ts:247-259 (registration)
    Tool registration in the tools array provided to MCP server.
    { 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'], }, },
  • Zod schema for validating tool arguments before calling the handler.
    const AllAccessibilityArgsSchema = z.object({ url: z.string().url(), waveApiKey: z.string().optional(), wcagLevel: z.string().optional(), });
  • TypeScript interface defining the output structure of the accessibility validation results.
    export interface AllAccessibilityResult { url: string; timestamp: string; wave?: WAVEResult; axe?: AxeResult; summary: { tools_run: string[]; total_violations: number; }; }

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