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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fileName": "<fileName>"
},
"name": "get_test_results"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileName | Yes | Name of the test result file to retrieve |
Implementation Reference
- src/server/mcpServer.ts:220-235 (handler)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 } ] }; } - src/server/mcpServer.ts:81-94 (registration)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'] } }, - src/server/mcpServer.ts:84-93 (schema)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'] } - src/utils/fileOutput.ts:142-152 (helper)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; } }