Skip to main content
Glama
hackle-io

hackle-mcp

Official
by hackle-io

push-message-list

Retrieve paginated push message lists with search functionality to filter by name, description, or campaign key. Simplifies fetching and managing A/B test data in Hackle MCP.

Instructions

Fetches a paginated list of push messages with search functionality.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNumberNo
pageSizeNo
searchKeywordNoname, description, or campaignKey of a push message.

Implementation Reference

  • Handler function that builds a query string from input parameters and fetches the paginated list of push messages via WebClient.get API call, returning JSON stringified response as text content.
    async ({ pageNumber = 1, pageSize = 100, searchKeyword = '' }) => {
      const qs = stringify(
        {
          pageNumber,
          pageSize,
          searchKeyword,
        },
        { addQueryPrefix: true },
      );
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(await WebClient.get(`/api/v1/push-messages${qs}`)),
          },
        ],
      };
    },
  • Input schema using Zod for validating optional parameters: pageNumber (default 1), pageSize (default 100), and searchKeyword.
    {
      pageNumber: z.number().optional().default(1),
      pageSize: z.number().optional().default(100),
      searchKeyword: z.string().optional().describe('name, description, or campaignKey of a push message.'),
    },
  • src/index.ts:113-140 (registration)
    Registration of the 'push-message-list' tool using server.tool, including description, input schema, and inline handler function.
    server.tool(
      'push-message-list',
      'Fetches a paginated list of push messages with search functionality.',
      {
        pageNumber: z.number().optional().default(1),
        pageSize: z.number().optional().default(100),
        searchKeyword: z.string().optional().describe('name, description, or campaignKey of a push message.'),
      },
      async ({ pageNumber = 1, pageSize = 100, searchKeyword = '' }) => {
        const qs = stringify(
          {
            pageNumber,
            pageSize,
            searchKeyword,
          },
          { addQueryPrefix: true },
        );
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(await WebClient.get(`/api/v1/push-messages${qs}`)),
            },
          ],
        };
      },
    );

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