in-app-message-detail
Retrieve detailed information on specific in-app messages using the tool integrated with Hackle’s MCP server, enabling precise querying of A/B test message data.
Instructions
Retrieves detailed information for a specific in-app message.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inAppMessageId | Yes |
Implementation Reference
- src/index.ts:100-109 (handler)The handler function for the 'in-app-message-detail' tool. It takes inAppMessageId, fetches the details from the Hackle API using WebClient.get, stringifies the JSON response, and returns it as text content.async ({ inAppMessageId }) => { return { content: [ { type: 'text', text: JSON.stringify(await WebClient.get(`/api/v1/in-app-messages/${inAppMessageId}`)), }, ], }; },
- src/index.ts:97-99 (schema)Zod input schema requiring a single parameter: inAppMessageId as a number.{ inAppMessageId: z.number(), },
- src/index.ts:94-110 (registration)Registration of the 'in-app-message-detail' tool using McpServer.tool method, specifying name, description, input schema, and handler function.server.tool( 'in-app-message-detail', 'Retrieves detailed information for a specific in-app message.', { inAppMessageId: z.number(), }, async ({ inAppMessageId }) => { return { content: [ { type: 'text', text: JSON.stringify(await WebClient.get(`/api/v1/in-app-messages/${inAppMessageId}`)), }, ], }; }, );
- src/WebClient.ts:70-72 (helper)WebClient.get static method, which performs the HTTP GET request to the Hackle API, used by the tool handler.public static async get<T = unknown>(path: string, options?: Omit<RequestInit, 'method'>): Promise<T> { return this.request<T>('GET', path, options); }