Skip to main content
Glama
jbuchan

Accessibility MCP Server

by jbuchan

get_test_results

Retrieve saved accessibility test results by filename to review compliance reports and remediation guidance for websites.

Instructions

Retrieve saved accessibility test results by filename

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNameYesName of the test result file to retrieve

Implementation Reference

  • The primary handler function for the 'get_test_results' tool. Retrieves test result content from FileOutputManager based on fileName argument and returns it as MCP CallToolResult content.
    private async handleGetTestResults(args: { fileName: string }): Promise<CallToolResult> {
      const content = await this.fileManager.getTestResult(args.fileName);
      
      if (!content) {
        throw new Error(`Test result file '${args.fileName}' not found`);
      }
    
      return {
        content: [
          {
            type: 'text',
            text: content
          }
        ]
      };
    }
  • Registration of the 'get_test_results' tool within the ListToolsRequestHandler response. Includes name, description, and input schema.
    {
      name: 'get_test_results',
      description: 'Retrieve saved accessibility test results by filename',
      inputSchema: {
        type: 'object',
        properties: {
          fileName: {
            type: 'string',
            description: 'Name of the test result file to retrieve'
          }
        },
        required: ['fileName']
      }
    },
  • Input schema defining the expected arguments for the get_test_results tool: an object with required 'fileName' string property.
    inputSchema: {
      type: 'object',
      properties: {
        fileName: {
          type: 'string',
          description: 'Name of the test result file to retrieve'
        }
      },
      required: ['fileName']
    }
  • Supporting utility method in FileOutputManager that performs the file system read operation for retrieving test result content by filename.
    async getTestResult(fileName: string): Promise<string | null> {
      const filePath = path.join(this.outputDir, fileName);
      
      try {
        const content = await fs.readFile(filePath, 'utf-8');
        return content;
      } catch (error) {
        console.error('Failed to read test result:', error);
        return null;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states retrieval but doesn't disclose behavioral traits like whether this is a read-only operation, if it requires specific permissions, what happens if the file doesn't exist (e.g., error handling), or if there are rate limits. The description is minimal and lacks operational context.

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 with zero waste. It's front-loaded with the core action and resource, 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 no annotations and no output schema, the description is incomplete for a tool that retrieves data. It doesn't explain what the returned test results contain (e.g., format, structure), error conditions, or dependencies on other tools. For a retrieval operation with zero structured context, this leaves significant gaps.

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?

Schema description coverage is 100%, with the single parameter 'fileName' well-documented in the schema. The description adds no additional parameter semantics beyond implying retrieval is filename-based, which the schema already covers. Baseline 3 is appropriate when schema does the heavy lifting.

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 ('Retrieve') and resource ('saved accessibility test results'), and specifies retrieval is 'by filename'. However, it doesn't explicitly differentiate from sibling tools like 'list_test_results' (which might list all results) or 'test_accessibility' (which might run new tests).

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. The description doesn't mention prerequisites (e.g., needing a saved file first), exclusions, or comparisons to siblings like 'list_test_results' for browsing or 'test_accessibility' for creating new results.

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/jbuchan/accessibility-mcp-server'

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