Skip to main content
Glama

run_accessibility_audit

Audit web page accessibility to identify issues and ensure compliance with standards for improved user experience.

Instructions

Run an accessibility audit on the current page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the accessibility audit. It evaluates JavaScript in the browser context to check for common accessibility issues like images without alt text, unlabeled inputs, and missing headings. Returns a formatted text report of the findings.
    async runAccessibilityAudit() {
      await this.ensureChromium();
      
      const result = await this.sendCDPCommand('Runtime.evaluate', {
        expression: `
          const results = [];
          const imagesWithoutAlt = Array.from(document.querySelectorAll('img:not([alt])')).length;
          if (imagesWithoutAlt > 0) {
            results.push(\`Found \${imagesWithoutAlt} images without alt text\`);
          }
          
          const inputsWithoutLabels = Array.from(document.querySelectorAll('input:not([aria-label]):not([id])')).length;
          if (inputsWithoutLabels > 0) {
            results.push(\`Found \${inputsWithoutLabels} inputs without proper labels\`);
          }
          
          const headings = Array.from(document.querySelectorAll('h1, h2, h3, h4, h5, h6'));
          if (headings.length === 0) {
            results.push('No heading structure found on page');
          }
          
          JSON.stringify(results.length > 0 ? results : ['Basic accessibility checks passed']);
        `,
        returnByValue: true
      });
      
      const auditResults = JSON.parse(result.result?.value || '[]');
      
      return {
        content: [{ type: 'text', text: `Accessibility Audit Results:\\n${auditResults.join('\\n')}` }],
      };
    }
  • The tool schema definition including name, description, and empty input schema (no parameters required). This is part of the tool list returned by ListToolsRequest.
    {
      name: 'run_accessibility_audit',
      description: 'Run an accessibility audit on the current page',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • index.js:379-380 (registration)
    The registration in the CallToolRequest handler switch statement that dispatches calls to the runAccessibilityAudit method.
    case 'run_accessibility_audit':
      return await this.runAccessibilityAudit();
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states the action ('run an accessibility audit') but doesn't disclose what the audit entails, how long it takes, whether it modifies the page, what output to expect, or any rate limits. This is inadequate for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without any wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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 the complexity of an audit tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the audit checks, what format results are in, whether it's blocking or async, or any error conditions. For a tool that likely produces detailed output, this leaves significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description adds no parameter information, which is appropriate here. Baseline 4 applies as per rules for zero parameters.

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 verb ('run') and resource ('accessibility audit on the current page'), making the purpose immediately understandable. It distinguishes this from non-audit siblings like 'click' or 'navigate', though it doesn't explicitly differentiate from other audit tools like 'run_performance_audit' or 'run_seo_audit'.

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?

No guidance is provided on when to use this tool versus alternatives like 'run_best_practices_audit' or 'run_seo_audit'. The description implies usage on 'the current page', but lacks context about prerequisites (e.g., needing a page loaded) or exclusions (e.g., not for non-web content).

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/nfodor/claude-arm64-browser'

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