get-test-run
Retrieve detailed information about a specific test run in QA Studio by providing project and test run IDs. This tool helps users access test execution data and results for analysis and reporting.
Instructions
Get detailed information about a specific test run
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | The project ID | |
| testRunId | Yes | The test run ID |
Implementation Reference
- src/index.ts:181-216 (registration)Registers the 'get-test-run' MCP tool with input schema and inline async handler function.server.registerTool( 'get-test-run', { description: 'Get detailed information about a specific test run', inputSchema: { projectId: z.string().describe('The project ID'), testRunId: z.string().describe('The test run ID') } }, async (args) => { try { const { projectId, testRunId } = args; const data = await apiRequest(`/projects/${projectId}/runs/${testRunId}`); return { content: [ { type: 'text' as const, text: JSON.stringify(data, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text' as const, text: `Error: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; } } );
- src/index.ts:183-189 (schema)Tool schema defining the input parameters: projectId and testRunId using Zod.{ description: 'Get detailed information about a specific test run', inputSchema: { projectId: z.string().describe('The project ID'), testRunId: z.string().describe('The test run ID') } },
- src/index.ts:190-216 (handler)The core handler logic: extracts args, makes API GET request to fetch test run details, returns formatted JSON response or error.async (args) => { try { const { projectId, testRunId } = args; const data = await apiRequest(`/projects/${projectId}/runs/${testRunId}`); return { content: [ { type: 'text' as const, text: JSON.stringify(data, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text' as const, text: `Error: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; } } );