Skip to main content
Glama
nks-hub

rybbit-mcp

by nks-hub

Funnel Step Sessions

rybbit_get_funnel_step_sessions
Read-onlyIdempotent

Identify sessions that reached or dropped off at a specific funnel step to analyze user drop-off and conversion behavior.

Instructions

Get the sessions that reached (or dropped off at) a specific funnel step. Useful for drilling into why users drop off at a particular funnel step.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteIdYesSite ID (numeric ID or domain identifier)
stepNumberYesThe funnel step number to get sessions for (1-indexed)
modeYes'reached' = sessions that made it to this step, 'dropped' = sessions that dropped off at this step
startDateNoStart date (YYYY-MM-DD)
endDateNoEnd date (YYYY-MM-DD)
timeZoneNoIANA timezone (default UTC)
filtersNoFilters to apply
pastMinutesStartNoMinutes ago start
pastMinutesEndNoMinutes ago end
stepsYesThe funnel steps definition (same as used in rybbit_analyze_funnel)
pageNoPage number, 1-indexed (default: 1)
limitNoResults per page (default: 20-50 depending on endpoint, max 200)

Implementation Reference

  • Registration of the tool 'rybbit_get_funnel_step_sessions' via server.registerTool() with its inputSchema (siteId, stepNumber, mode, steps, dates, filters, pagination) and annotations.
    server.registerTool(
      "rybbit_get_funnel_step_sessions",
      {
        title: "Funnel Step Sessions",
        description:
          "Get the sessions that reached (or dropped off at) a specific funnel step. Useful for drilling into why users drop off at a particular funnel step.",
        annotations: {
          readOnlyHint: true,
          idempotentHint: true,
          openWorldHint: true,
          destructiveHint: false,
        },
        inputSchema: {
          siteId: siteIdSchema,
          stepNumber: z
            .number()
            .int()
            .min(1)
            .describe("The funnel step number to get sessions for (1-indexed)"),
          mode: z
            .enum(["reached", "dropped"])
            .describe("'reached' = sessions that made it to this step, 'dropped' = sessions that dropped off at this step"),
          startDate: z
            .string()
            .optional()
            .describe("Start date (YYYY-MM-DD)"),
          endDate: z
            .string()
            .optional()
            .describe("End date (YYYY-MM-DD)"),
          timeZone: z
            .string()
            .optional()
            .describe("IANA timezone (default UTC)"),
          filters: z
            .array(filterSchema)
            .optional()
            .describe("Filters to apply"),
          pastMinutesStart: z
            .number()
            .optional()
            .describe("Minutes ago start"),
          pastMinutesEnd: z
            .number()
            .optional()
            .describe("Minutes ago end"),
          steps: z
            .array(
              z.object({
                value: z.string().describe("Page path or event name"),
                type: z.enum(["page", "event"]).describe("Step type"),
                name: z
                  .string()
                  .optional()
                  .describe("Display name for the step"),
              })
            )
            .min(2)
            .describe("The funnel steps definition (same as used in rybbit_analyze_funnel)"),
          ...paginationSchema,
        },
      },
  • Handler function that executes the tool logic: destructures args, builds analytics params with mode, POSTs to /sites/{siteId}/funnels/{stepNumber}/sessions with steps body, and returns truncated response.
      async (args) => {
        try {
          const { siteId, stepNumber, mode, steps, ...rest } = args as {
            siteId: string;
            stepNumber: number;
            mode: "reached" | "dropped";
            steps: FunnelStep[];
            startDate?: string;
            endDate?: string;
            timeZone?: string;
            filters?: Array<{
              parameter: string;
              type: string;
              value: (string | number)[];
            }>;
            pastMinutesStart?: number;
            pastMinutesEnd?: number;
            page?: number;
            limit?: number;
          };
    
          const params = client.buildAnalyticsParams({ ...rest, page: rest.page ?? 1 });
          params.mode = mode;
    
          const data = await client.post(
            `/sites/${siteId}/funnels/${stepNumber}/sessions`,
            { steps },
            params
          );
          return {
            content: [{ type: "text" as const, text: truncateResponse(data) }],
          };
        } catch (err) {
          const message = err instanceof Error ? err.message : String(err);
          return {
            content: [{ type: "text" as const, text: `Error: ${message}` }],
            isError: true,
          };
        }
      }
    );
  • Input schema for the tool: siteId, stepNumber (int min 1), mode (reached/dropped), startDate, endDate, timeZone, filters array, pastMinutesStart, pastMinutesEnd, steps array (min 2 of value/type/name), and pagination (page/limit).
    inputSchema: {
      siteId: siteIdSchema,
      stepNumber: z
        .number()
        .int()
        .min(1)
        .describe("The funnel step number to get sessions for (1-indexed)"),
      mode: z
        .enum(["reached", "dropped"])
        .describe("'reached' = sessions that made it to this step, 'dropped' = sessions that dropped off at this step"),
      startDate: z
        .string()
        .optional()
        .describe("Start date (YYYY-MM-DD)"),
      endDate: z
        .string()
        .optional()
        .describe("End date (YYYY-MM-DD)"),
      timeZone: z
        .string()
        .optional()
        .describe("IANA timezone (default UTC)"),
      filters: z
        .array(filterSchema)
        .optional()
        .describe("Filters to apply"),
      pastMinutesStart: z
        .number()
        .optional()
        .describe("Minutes ago start"),
      pastMinutesEnd: z
        .number()
        .optional()
        .describe("Minutes ago end"),
      steps: z
        .array(
          z.object({
            value: z.string().describe("Page path or event name"),
            type: z.enum(["page", "event"]).describe("Step type"),
            name: z
              .string()
              .optional()
              .describe("Display name for the step"),
          })
        )
        .min(2)
        .describe("The funnel steps definition (same as used in rybbit_analyze_funnel)"),
      ...paginationSchema,
    },
  • FunnelStep interface used in the handler to type the steps parameter.
    interface FunnelStep {
      value: string;
      type: "page" | "event";
      name?: string;
    }
  • src/index.ts:46-48 (registration)
    Registration of the registerFunnelsTools function (which registers rybbit_get_funnel_step_sessions along with other funnel tools) in the main entry point.
    registerFunnelsTools(server, client);
    registerGoalsTools(server, client);
    registerJourneysTools(server, client);
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and idempotentHint=true, so the agent knows it's safe. The description adds no further behavioral details beyond what the schema (e.g., mode parameter) provides. It does not mention pagination behavior, rate limits, or authorization requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, front-loaded with the core purpose, and contains no extraneous information. Every word is valuable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (12 parameters) and no output schema, the description is minimal. It does not explain the return format (e.g., list of session objects with IDs or details). While the schema documents inputs well, the absence of output info leaves the agent guessing about the response structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description does not add any additional meaning beyond the parameter descriptions in the schema. It rephrases the mode parameter but offers no new insight.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves sessions for a specific funnel step, with the ability to filter by reached or dropped. It distinguishes itself from sibling tools like rybbit_analyze_funnel and rybbit_get_goal_sessions by focusing on individual step drilling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says it's useful for drilling into user drop-off at a particular step, providing clear use-case context. It does not list exclusions or alternatives, but the sibling names and schema parameters (steps, stepNumber) imply when to use it vs. other funnel tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/nks-hub/rybbit-mcp'

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