Skip to main content
Glama
nks-hub

rybbit-mcp

by nks-hub

User Journeys

rybbit_get_journeys
Read-onlyIdempotent

Analyzes user navigation paths through a site, showing sequences of pages visited and session counts per path to identify common user flows.

Instructions

Get user journey (flow) analysis showing the most common navigation paths through the site. Shows sequences of pages users visit and how many sessions follow each path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteIdYesSite ID (numeric ID or domain identifier)
startDateNoStart date (YYYY-MM-DD)
endDateNoEnd date (YYYY-MM-DD)
timeZoneNoIANA timezone (default UTC)
filtersNoFilters to apply
pastMinutesStartNoMinutes ago start
pastMinutesEndNoMinutes ago end
stepsNoNumber of journey steps to analyze (default 3)
journeyLimitNoMax number of journey paths to return (default 100)

Implementation Reference

  • The handler function for rybbit_get_journeys. It destructures args (siteId, steps, journeyLimit, plus analytics params), builds query params via client.buildAnalyticsParams(), calls client.get() on /sites/{siteId}/journeys, and returns the response or an error.
      async (args) => {
        try {
          const { siteId, steps, journeyLimit, ...rest } = args as {
            siteId: string;
            steps?: number;
            journeyLimit?: number;
            startDate?: string;
            endDate?: string;
            timeZone?: string;
            filters?: Array<{
              parameter: string;
              type: string;
              value: (string | number)[];
            }>;
            pastMinutesStart?: number;
            pastMinutesEnd?: number;
          };
    
          const params = client.buildAnalyticsParams(rest);
    
          if (steps !== undefined) params.steps = steps;
          if (journeyLimit !== undefined) params.limit = journeyLimit;
    
          const data = await client.get<JourneyPath[]>(
            `/sites/${siteId}/journeys`,
            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 (inputSchema) for rybbit_get_journeys. Defines siteId, startDate, endDate, timeZone, filters, pastMinutesStart, pastMinutesEnd, steps (2-10, default 3), and journeyLimit.
    inputSchema: {
      siteId: siteIdSchema,
      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
        .number()
        .int()
        .min(2)
        .max(10)
        .optional()
        .describe("Number of journey steps to analyze (default 3)"),
      journeyLimit: z
        .number()
        .int()
        .optional()
        .describe("Max number of journey paths to return (default 100)"),
    },
  • Registration function registerJourneysTools which calls server.registerTool with the name 'rybbit_get_journeys', schema metadata, and handler. Called from src/index.ts line 48.
    export function registerJourneysTools(
      server: McpServer,
      client: RybbitClient
    ): void {
      server.registerTool(
        "rybbit_get_journeys",
        {
          title: "User Journeys",
          description:
            "Get user journey (flow) analysis showing the most common navigation paths through the site. Shows sequences of pages users visit and how many sessions follow each path.",
          annotations: {
            readOnlyHint: true,
            idempotentHint: true,
            openWorldHint: true,
            destructiveHint: false,
          },
          inputSchema: {
            siteId: siteIdSchema,
            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
              .number()
              .int()
              .min(2)
              .max(10)
              .optional()
              .describe("Number of journey steps to analyze (default 3)"),
            journeyLimit: z
              .number()
              .int()
              .optional()
              .describe("Max number of journey paths to return (default 100)"),
          },
        },
        async (args) => {
          try {
            const { siteId, steps, journeyLimit, ...rest } = args as {
              siteId: string;
              steps?: number;
              journeyLimit?: number;
              startDate?: string;
              endDate?: string;
              timeZone?: string;
              filters?: Array<{
                parameter: string;
                type: string;
                value: (string | number)[];
              }>;
              pastMinutesStart?: number;
              pastMinutesEnd?: number;
            };
    
            const params = client.buildAnalyticsParams(rest);
    
            if (steps !== undefined) params.steps = steps;
            if (journeyLimit !== undefined) params.limit = journeyLimit;
    
            const data = await client.get<JourneyPath[]>(
              `/sites/${siteId}/journeys`,
              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,
            };
          }
        }
      );
    }
  • The complete registerJourneysTools function containing registration, schema, and handler logic for rybbit_get_journeys.
    export function registerJourneysTools(
      server: McpServer,
      client: RybbitClient
    ): void {
      server.registerTool(
        "rybbit_get_journeys",
        {
          title: "User Journeys",
          description:
            "Get user journey (flow) analysis showing the most common navigation paths through the site. Shows sequences of pages users visit and how many sessions follow each path.",
          annotations: {
            readOnlyHint: true,
            idempotentHint: true,
            openWorldHint: true,
            destructiveHint: false,
          },
          inputSchema: {
            siteId: siteIdSchema,
            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
              .number()
              .int()
              .min(2)
              .max(10)
              .optional()
              .describe("Number of journey steps to analyze (default 3)"),
            journeyLimit: z
              .number()
              .int()
              .optional()
              .describe("Max number of journey paths to return (default 100)"),
          },
        },
        async (args) => {
          try {
            const { siteId, steps, journeyLimit, ...rest } = args as {
              siteId: string;
              steps?: number;
              journeyLimit?: number;
              startDate?: string;
              endDate?: string;
              timeZone?: string;
              filters?: Array<{
                parameter: string;
                type: string;
                value: (string | number)[];
              }>;
              pastMinutesStart?: number;
              pastMinutesEnd?: number;
            };
    
            const params = client.buildAnalyticsParams(rest);
    
            if (steps !== undefined) params.steps = steps;
            if (journeyLimit !== undefined) params.limit = journeyLimit;
    
            const data = await client.get<JourneyPath[]>(
              `/sites/${siteId}/journeys`,
              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,
            };
          }
        }
      );
    }
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true, so the description does not need to cover safety. It adds moderate behavioral context by describing the output (sequences and session counts), but lacks details on limitations, sampling, or data freshness.

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, front-loaded with the verb and resource, with no unnecessary words or repetitions. Every sentence adds value.

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

Completeness4/5

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

With 9 parameters (all optional except siteId) and no output schema, the description explains the return value adequately (sequences and session counts). Additional output schema would improve completeness, but the description is sufficient for an agent to understand what the tool returns.

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 description coverage is 100%, with all parameters documented in the input schema. The description does not add extra meaning beyond the schema, which is acceptable given the high coverage, warranting a baseline score of 3.

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 the verb 'Get', the resource 'user journey (flow) analysis', and explains it shows 'common navigation paths' with session counts, distinguishing it from siblings like funnel analysis or session listing.

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

Usage Guidelines3/5

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

The description implies usage for analyzing navigation paths but provides no explicit guidance on when to use this tool versus alternatives like rybbit_analyze_funnel or rybbit_list_sessions, nor any exclusions or prerequisites.

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