list_test_results
View all accessibility test result files to analyze WCAG compliance reports, identify violations, and access remediation guidance for website audits.
Instructions
List all available accessibility test result files
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server/mcpServer.ts:237-261 (handler)Main handler function for the 'list_test_results' tool. It calls the fileManager to list test result files, handles empty case, and formats the numbered list into a CallToolResult response.private async handleListTestResults(): Promise<CallToolResult> { const files = await this.fileManager.listTestResults(); if (files.length === 0) { return { content: [ { type: 'text', text: 'No accessibility test results found.' } ] }; } const fileList = files.map((file, index) => `${index + 1}. ${file}`).join('\n'); return { content: [ { type: 'text', text: `Available test result files:\n\n${fileList}` } ] }; }
- src/server/mcpServer.ts:95-103 (registration)Tool registration in the ListToolsRequestHandler, defining name, description, and empty input schema.{ name: 'list_test_results', description: 'List all available accessibility test result files', inputSchema: { type: 'object', properties: {}, additionalProperties: false } }
- src/server/mcpServer.ts:98-101 (schema)Input schema for the 'list_test_results' tool, which takes no parameters.inputSchema: { type: 'object', properties: {}, additionalProperties: false
- src/utils/fileOutput.ts:154-162 (helper)Helper method in FileOutputManager that reads the output directory and filters for accessibility test result files (.txt files starting with 'accessibility-test-'). Called by the main handler.async listTestResults(): Promise<string[]> { try { const files = await fs.readdir(this.outputDir); return files.filter(file => file.startsWith('accessibility-test-') && file.endsWith('.txt')); } catch (error) { console.error('Failed to list test results:', error); return []; } }