get_test
Retrieve detailed information about a specific BugBug test using its unique identifier to access execution status, results, and related data.
Instructions
Get details of a specific BugBug test
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| testId | Yes | Test UUID |
Implementation Reference
- src/tools/tests.ts:71-107 (handler)The handler function that implements the core logic of the 'get_test' tool. It calls bugbugClient.getTest(testId), processes the response, formats it as structured text content, and handles errors.handler: async ({ testId }) => { try { const response = await bugbugClient.getTest(testId); if (response.status !== 200) { return { content: [ { type: 'text', text: `Error: ${response.status} ${response.statusText}`, }, ], }; } const test = response.data; return { content: [ { type: 'text', text: `**Test Details:**\n\n- **Name:** ${test.name}\n- **ID:** ${test.id}\n- **Is Active:** ${test.isActive ? 'Yes' : 'No'}\n- **Is Recording:** ${test.isRecording ? 'Yes' : 'No'}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching test: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } }
- src/tools/tests.ts:68-70 (schema)Input schema for the 'get_test' tool using Zod, validating testId as a required string.inputSchema: z.object({ testId: z.string().describe('Test UUID'), }).shape,
- src/tools/index.ts:11-33 (registration)Registers the 'get_test' tool (imported via testsTools) to the MCP server by name, using its schema, description, and handler.export function registerAllTools(server: McpServer): void { const tools: Record<string, Tool> = { ...configTools, ...testsTools, ...testRunsTools, ...suitesTools, ...suiteRunsTools, ...profilesTools, ...advancedTools, }; for (const t in tools) { server.registerTool( tools[t].name, { description: tools[t].description, inputSchema: tools[t].inputSchema, annotations: { title: tools[t].title }, }, (args: unknown) => tools[t].handler(args as unknown) ); } }