stickiness-series
Analyze user engagement by retrieving time-series data on return visit frequency. Choose weekly or monthly units to track stickiness trends over time using Hackle MCP server.
Instructions
Retrieves time-series data of user stickiness (return visit frequency). Available in weekly and monthly units.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | End date in YYYY-MM-DD format. | |
| unit | Yes |
Implementation Reference
- src/index.ts:206-225 (registration)Registration of the 'stickiness-series' tool, including the handler function that fetches stickiness series data from the Hackle API endpoint using WebClient.get with unit and date query parameters.server.tool( 'stickiness-series', 'Retrieves time-series data of user stickiness (return visit frequency). Available in weekly and monthly units.', { unit: z.enum(['WEEK', 'MONTH']), date: z.string().optional().describe('End date in YYYY-MM-DD format.'), }, async ({ unit = 'WEEK', date = '' }) => { const qs = stringify({ unit, date }, { addQueryPrefix: true }); return { content: [ { type: 'text', text: JSON.stringify(await WebClient.get(`/api/v1/workspaces/auto-metrics/stickiness-series${qs}`)), }, ], }; }, );
- src/index.ts:213-224 (handler)Handler function executing the tool logic: builds query string from inputs and retrieves JSON data from the stickiness-series API endpoint via WebClient.async ({ unit = 'WEEK', date = '' }) => { const qs = stringify({ unit, date }, { addQueryPrefix: true }); return { content: [ { type: 'text', text: JSON.stringify(await WebClient.get(`/api/v1/workspaces/auto-metrics/stickiness-series${qs}`)), }, ], }; },
- src/index.ts:209-212 (schema)Input schema using Zod: unit enum ['WEEK', 'MONTH'] (default 'WEEK'), optional date string.{ unit: z.enum(['WEEK', 'MONTH']), date: z.string().optional().describe('End date in YYYY-MM-DD format.'), },
- src/WebClient.ts:70-72 (helper)WebClient.get static method used by the handler to perform HTTP GET request to the API.public static async get<T = unknown>(path: string, options?: Omit<RequestInit, 'method'>): Promise<T> { return this.request<T>('GET', path, options); }