Skip to main content
Glama

get_test_results

Retrieve saved accessibility test results by filename to analyze WCAG compliance reports with violation summaries and remediation guidance.

Instructions

Retrieve saved accessibility test results by filename

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNameYesName of the test result file to retrieve

Implementation Reference

  • Main handler function for the 'get_test_results' tool. It retrieves the test result content from the file manager and returns it as MCP CallToolResult.
    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 } ] }; }
  • Input schema definition for the 'get_test_results' tool, specifying the expected fileName parameter.
    inputSchema: { type: 'object', properties: { fileName: { type: 'string', description: 'Name of the test result file to retrieve' } }, required: ['fileName']
  • Tool registration in the ListTools response, defining 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'] } },
  • Supporting utility method in FileOutputManager that reads the content of a test result file by name.
    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; } }

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