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
| Name | Required | Description | Default |
|---|---|---|---|
| fileName | Yes | Name of the test result file to retrieve |
Implementation Reference
- src/server/mcpServer.ts:220-235 (handler)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 } ] }; }
- src/server/mcpServer.ts:84-92 (schema)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']
- src/server/mcpServer.ts:81-94 (registration)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'] } },
- src/utils/fileOutput.ts:142-152 (helper)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; } }