Skip to main content
Glama
hackle-io

hackle-mcp

Official
by hackle-io

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
NameRequiredDescriptionDefault
inAppMessageIdYes

Implementation Reference

  • 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}`)),
          },
        ],
      };
    },
  • 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}`)),
            },
          ],
        };
      },
    );
  • 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);
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hackle-io/hackle-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server