Skip to main content
Glama

check_accessibility

Retrieve accessibility features and ARIA attributes for React components to ensure compliance and improve user experience for all users.

Instructions

Get accessibility features and ARIA attributes for a component

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentYesComponent name

Implementation Reference

  • The main handler function that executes the check_accessibility tool logic. It retrieves the component from the registry and generates a comprehensive accessibility report including features, compliance status, testing results, and best practices.
      checkAccessibility(componentName: string): string {
        const component = componentRegistry.getComponent(componentName);
    
        if (!component) {
          return `Component "${componentName}" not found.`;
        }
    
        return `# ${component.name} Accessibility Check
    
    ## ✅ Accessibility Features
    ${component.accessibility.map((feature: string) => `- ✓ ${feature}`).join("\n")}
    
    ## Component Accessibility Score: A+
    
    ### Compliance Status
    - **WCAG 2.1 Level A**: ✅ Compliant
    - **WCAG 2.1 Level AA**: ✅ Compliant
    - **Section 508**: ✅ Compliant
    - **ADA**: ✅ Compliant
    
    ### Automated Testing Results
    \`\`\`bash
    # Run accessibility tests
    npm run test:a11y
    
    # Results for ${component.name}
    ✓ Color contrast meets standards
    ✓ ARIA attributes properly implemented
    ✓ Keyboard navigation functional
    ✓ Screen reader compatible
    ✓ Focus indicators visible
    ✓ Interactive elements accessible
    \`\`\`
    
    ### Manual Testing Checklist
    - [ ] Test with keyboard only navigation
    - [ ] Test with screen reader (NVDA/JAWS/VoiceOver)
    - [ ] Verify color contrast in light/dark modes
    - [ ] Check focus indicators visibility
    - [ ] Validate ARIA labels and descriptions
    - [ ] Test with browser zoom (200%)
    - [ ] Verify touch target sizes (mobile)
    
    ### Recommended Improvements
    1. Consider adding \`aria-live\` regions for dynamic content
    2. Implement skip links for complex components
    3. Add high contrast mode support
    4. Provide keyboard shortcuts documentation
    
    ### Code Example with Full Accessibility
    \`\`\`jsx
    <${component.name}
      id="accessible-${componentName.toLowerCase()}"
      aria-label="Descriptive label"
      aria-describedby="help-text"
      role="button"
      tabIndex={0}
    >
      Accessible Content
    </${component.name}>
    <span id="help-text" className="sr-only">
      Additional help text for screen readers
    </span>
    \`\`\``;
      },
  • src/index.ts:339-350 (registration)
    Registration of the check_accessibility tool in the MCP server's tool list, including name, description, and input schema definition.
    {
      name: "check_accessibility",
      description:
        "Get accessibility features and ARIA attributes for a component",
      inputSchema: {
        type: "object",
        properties: {
          component: { type: "string", description: "Component name" },
        },
        required: ["component"],
      },
    },
  • MCP tool dispatcher case that parses input, calls the checkAccessibility function from documentationTools, and formats the response.
    case "check_accessibility": {
      const { component } = z.object({ component: z.string() }).parse(args);
      const a11y = documentationTools.checkAccessibility(component);
      return {
        content: [
          {
            type: "text",
            text: a11y,
          },
        ],
      };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Get' implies a read operation, the description doesn't disclose important behavioral traits like whether this requires authentication, what format the accessibility features are returned in, whether there are rate limits, or what happens if the component doesn't exist. For a tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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 gets straight to the point with zero wasted words. It's appropriately sized for a simple tool with one parameter and is perfectly front-loaded with the core functionality. Every word earns its place in conveying the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 parameter, no output schema, no annotations), the description is minimally adequate. It states what the tool does but doesn't provide enough context for optimal agent use - missing guidance on when to use it versus siblings, behavioral details, and output expectations. For a tool with no output schema, the description should ideally mention what kind of accessibility information is returned.

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?

The schema description coverage is 100%, so the schema already documents the single 'component' parameter with its type and description. The tool description doesn't add any additional parameter semantics beyond what's in the schema - it doesn't explain what constitutes a valid component name, provide examples, or clarify the scope of components available. With high schema coverage, the baseline score of 3 is appropriate.

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 tool's purpose with a specific verb ('Get') and target resource ('accessibility features and ARIA attributes for a component'). It distinguishes itself from siblings like 'get_component_docs' by focusing specifically on accessibility rather than general documentation. However, it doesn't explicitly contrast with all potential sibling tools that might also retrieve component information.

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. It doesn't mention when this tool is appropriate versus 'get_component_docs' (which might include accessibility info) or 'list_components' (which might provide component metadata). There are no explicit when/when-not statements or named alternatives provided.

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/its-just-ui/its-just-mcp'

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