data-report-detail
Retrieve detailed A/B test data reports by specifying a report ID using a tool on the Hackle MCP server for precise analysis and insights.
Instructions
fetch data report detail.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataReportId | Yes |
Implementation Reference
- src/index.ts:240-256 (registration)Registration of the 'data-report-detail' tool using server.tool, including name, description, input schema, and inline handler function that fetches the data report detail from the API.server.tool( 'data-report-detail', 'fetch data report detail.', { dataReportId: z.number().positive(), }, async ({ dataReportId }) => { return { content: [ { type: 'text', text: JSON.stringify(await WebClient.get(`/api/v1/data-reports/${dataReportId}`)), }, ], }; }, );
- src/index.ts:243-245 (schema)Input schema for the tool, defining 'dataReportId' as a positive number using Zod.{ dataReportId: z.number().positive(), },
- src/index.ts:246-255 (handler)Handler function that retrieves the data report detail by ID using WebClient.get, stringifies the response as JSON, and returns it as text content block.async ({ dataReportId }) => { return { content: [ { type: 'text', text: JSON.stringify(await WebClient.get(`/api/v1/data-reports/${dataReportId}`)), }, ], }; },
- src/WebClient.ts:70-72 (helper)WebClient.get method, a static helper used by the handler to perform GET requests to the Hackle API.public static async get<T = unknown>(path: string, options?: Omit<RequestInit, 'method'>): Promise<T> { return this.request<T>('GET', path, options); }