Skip to main content
Glama
hackle-io

hackle-mcp

Official
by hackle-io

retention-series

Retrieve time-series user retention data in daily, weekly, or monthly units using the specified end date in YYYY-MM-DD format. Analyze retention trends for informed decision-making.

Instructions

Retrieves time-series data of user retention. Available in daily, weekly, and monthly units.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoEnd date in YYYY-MM-DD format.
unitYes

Implementation Reference

  • The handler function that takes unit and date parameters, builds a query string, calls WebClient.get to fetch retention series data from the '/api/v1/workspaces/auto-metrics/retention-series' endpoint, stringifies the JSON response, and returns it as text content.
    async ({ unit = 'DAY', date = '' }) => {
      const qs = stringify({ unit, date }, { addQueryPrefix: true });
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(await WebClient.get(`/api/v1/workspaces/auto-metrics/retention-series${qs}`)),
          },
        ],
      };
    },
  • Zod input schema defining the parameters: unit (required enum: DAY, WEEK, MONTH, default DAY) and optional date string.
    {
      unit: z.enum(['DAY', 'WEEK', 'MONTH']),
      date: z.string().optional().describe('End date in YYYY-MM-DD format.'),
    },
  • src/index.ts:184-203 (registration)
    The server.tool registration call that defines and registers the 'retention-series' tool with its description, input schema, and handler function.
    server.tool(
      'retention-series',
      'Retrieves time-series data of user retention. Available in daily, weekly, and monthly units.',
      {
        unit: z.enum(['DAY', 'WEEK', 'MONTH']),
        date: z.string().optional().describe('End date in YYYY-MM-DD format.'),
      },
      async ({ unit = 'DAY', date = '' }) => {
        const qs = stringify({ unit, date }, { addQueryPrefix: true });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(await WebClient.get(`/api/v1/workspaces/auto-metrics/retention-series${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