push-message-detail
Retrieve detailed information for a specific push message using the pushMessageId to analyze and manage targeted communication campaigns effectively.
Instructions
Retrieves detailed information for a specific push message.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pushMessageId | Yes |
Implementation Reference
- src/index.ts:149-158 (handler)The handler function for the 'push-message-detail' tool. It takes pushMessageId, calls WebClient.get to fetch the details from the API, stringifies the JSON response, and returns it as text content.async ({ pushMessageId }) => { return { content: [ { type: 'text', text: JSON.stringify(await WebClient.get(`/api/v1/push-messages/${pushMessageId}`)), }, ], }; },
- src/index.ts:146-148 (schema)Input schema for the tool, requiring a numeric pushMessageId parameter.{ pushMessageId: z.number(), },
- src/index.ts:143-159 (registration)Registration of the 'push-message-detail' tool on the MCP server using server.tool, including name, description, schema, and inline handler.server.tool( 'push-message-detail', 'Retrieves detailed information for a specific push message.', { pushMessageId: z.number(), }, async ({ pushMessageId }) => { return { content: [ { type: 'text', text: JSON.stringify(await WebClient.get(`/api/v1/push-messages/${pushMessageId}`)), }, ], }; }, );
- src/WebClient.ts:70-72 (helper)WebClient.get method called by the handler to perform the HTTP GET request to '/api/v1/push-messages/{pushMessageId}'.public static async get<T = unknown>(path: string, options?: Omit<RequestInit, 'method'>): Promise<T> { return this.request<T>('GET', path, options); }