Skip to main content
Glama
nks-hub

rybbit-mcp

by nks-hub

Goal Sessions

rybbit_get_goal_sessions
Read-onlyIdempotent

Retrieve sessions that completed a specific goal to analyze user behavior and identify conversion patterns. Filter by date, timezone, and user attributes for targeted insights.

Instructions

Get sessions that completed a specific goal. Useful for analyzing which users and sessions triggered goal conversions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteIdYesSite ID (numeric ID or domain identifier)
goalIdYesGoal ID to get sessions for. Use rybbit_list_goals to find goal IDs.
startDateNoStart date (YYYY-MM-DD)
endDateNoEnd date (YYYY-MM-DD)
timeZoneNoIANA timezone (default UTC)
filtersNoFilters to apply
pastMinutesStartNoMinutes ago start
pastMinutesEndNoMinutes ago end
pageNoPage number, 1-indexed (default: 1)
limitNoResults per page (default: 20-50 depending on endpoint, max 200)

Implementation Reference

  • The handler function for the `rybbit_get_goal_sessions` tool, which fetches sessions for a specific goal from the Rybbit API.
      async (args) => {
        try {
          const { siteId, goalId, ...rest } = args as {
            siteId: string;
            goalId: string;
            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);
    
          const data = await client.get(
            `/sites/${siteId}/goals/${goalId}/sessions`,
            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 registration and schema definition for the `rybbit_get_goal_sessions` tool.
    "rybbit_get_goal_sessions",
    {
      title: "Goal Sessions",
      description:
        "Get sessions that completed a specific goal. Useful for analyzing which users and sessions triggered goal conversions.",
      annotations: {
        readOnlyHint: true,
        idempotentHint: true,
        openWorldHint: true,
        destructiveHint: false,
      },
      inputSchema: {
        siteId: siteIdSchema,
        goalId: z
          .string()
          .describe("Goal ID to get sessions for. Use rybbit_list_goals to find goal IDs."),
        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"),
        ...paginationSchema,
      },
    },
Behavior3/5

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

Annotations cover safety (readOnlyHint, destructiveHint, idempotentHint), so description adds business context about what 'goal completion' means (conversion analysis). However, with no output schema provided, the description fails to disclose what data structure or fields are returned (session IDs? user details? timestamps?), leaving a significant behavioral gap.

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?

Two sentences with zero waste: first defines the operation, second states the use case. Front-loaded with the core action 'Get sessions'. No redundancy with schema or annotations.

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?

Adequate for a read-only tool with good annotations, but gaps remain given the complexity (10 params, nested filters) and missing output schema. The description omits what constitutes a 'session' object in the response and doesn't mention pagination behavior despite page/limit parameters being present.

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%, providing detailed documentation for all 10 parameters including complex filter dimensions. The description doesn't add parameter syntax or format details beyond what's in the schema, which is appropriate baseline given the comprehensive schema coverage.

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

Purpose4/5

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

Clear verb-resource combination ('Get sessions') with specific scope ('that completed a specific goal'). Distinguishes from sibling tools by focusing on 'goal' conversions rather than general sessions (rybbit_list_sessions) or funnel steps (rybbit_get_funnel_step_sessions), though it doesn't explicitly name these alternatives.

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?

Provides implied usage context ('Useful for analyzing which users and sessions triggered goal conversions') indicating the analysis use case. However, lacks explicit when-to-use guidance, prerequisites (e.g., needing a goalId from rybbit_list_goals), or when to prefer funnel session tools instead.

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