Skip to main content
Glama
nks-hub

rybbit-mcp

by nks-hub

Error Tracking

rybbit_get_errors
Read-onlyIdempotent

Retrieve error tracking data from Rybbit Analytics: get error type summaries with counts, inspect individual error instances with stack traces, and analyze error trends over time. Filter by site, date range, and other dimensions.

Instructions

Get error tracking data. Workflow: (1) type='names' to see error types and counts, (2) type='events' with errorMessage to see individual instances with stack traces, (3) type='timeseries' with errorMessage to see trends over time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteIdYesSite ID (numeric ID or domain identifier)
startDateNoStart date in ISO format (YYYY-MM-DD)
endDateNoEnd date in ISO format (YYYY-MM-DD)
timeZoneNoIANA timezone (e.g., Europe/Prague). Default: UTC
filtersNoArray of filters. Example: [{parameter:'browser',type:'equals',value:['Chrome']},{parameter:'country',type:'equals',value:['US','DE']}]
pastMinutesStartNoAlternative to dates: minutes ago start (e.g., 60 = last hour)
pastMinutesEndNoAlternative to dates: minutes ago end (default 0 = now)
pageNoPage number, 1-indexed (default: 1)
limitNoResults per page (default: 20-50 depending on endpoint, max 200)
typeNo'names' for error type summary with counts, 'events' for individual error instances with stack traces, 'timeseries' for error count trends over time for a specific error. Default: names
errorMessageNoError message filter (required for type='events' and type='timeseries'). Use type='names' first to discover error messages.
bucketNoTime bucket for timeseries type (default: day)

Implementation Reference

  • Registration of the 'rybbit_get_errors' tool via server.registerTool()
    server.registerTool(
      "rybbit_get_errors",
      {
        title: "Error Tracking",
        description:
          "Get error tracking data. Workflow: (1) type='names' to see error types and counts, (2) type='events' with errorMessage to see individual instances with stack traces, (3) type='timeseries' with errorMessage to see trends over time.",
        annotations: {
          readOnlyHint: true,
          idempotentHint: true,
          openWorldHint: true,
          destructiveHint: false,
        },
        inputSchema: {
          ...analyticsInputSchema,
          ...paginationSchema,
          type: z
            .enum(["names", "events", "timeseries"])
            .optional()
            .describe(
              "'names' for error type summary with counts, 'events' for individual error instances with stack traces, 'timeseries' for error count trends over time for a specific error. Default: names"
            ),
          errorMessage: z
            .string()
            .optional()
            .describe("Error message filter (required for type='events' and type='timeseries'). Use type='names' first to discover error messages."),
          bucket: z
            .enum(["minute", "five_minutes", "hour", "day", "week", "month"])
            .optional()
            .describe("Time bucket for timeseries type (default: day)"),
        },
      },
      async (args) => {
        try {
          const { siteId, type, errorMessage, bucket, page, limit, ...rest } = args as {
            siteId: string;
            type?: "names" | "events" | "timeseries";
            errorMessage?: string;
            bucket?: string;
            page?: number;
            limit?: 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, page, limit, bucket });
    
          if (type === "timeseries") {
            if (!errorMessage) {
              return {
                content: [{ type: "text" as const, text: "Error: errorMessage is required for type='timeseries'. Use type='names' first to discover error messages, then pass one to errorMessage." }],
                isError: true,
              };
            }
            params.errorMessage = errorMessage;
            const data = await client.get<unknown[]>(
              `/sites/${siteId}/error-bucketed`,
              params
            );
            return {
              content: [{ type: "text" as const, text: truncateResponse(data) }],
            };
          }
    
          if (type === "events") {
            if (!errorMessage) {
              return {
                content: [{ type: "text" as const, text: "Error: errorMessage is required for type='events'. Use type='names' first to discover error messages, then pass one to errorMessage." }],
                isError: true,
              };
            }
            params.errorMessage = errorMessage;
            const data = await client.get<ErrorEvent[]>(
              `/sites/${siteId}/error-events`,
              params
            );
            return {
              content: [{ type: "text" as const, text: truncateResponse(data) }],
            };
          }
    
          const data = await client.get<ErrorName[]>(
            `/sites/${siteId}/error-names`,
            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,
          };
        }
      }
    );
  • Handler function for rybbit_get_errors - executes the tool logic, dispatching to error-names, error-events, or error-bucketed endpoints based on type parameter
      async (args) => {
        try {
          const { siteId, type, errorMessage, bucket, page, limit, ...rest } = args as {
            siteId: string;
            type?: "names" | "events" | "timeseries";
            errorMessage?: string;
            bucket?: string;
            page?: number;
            limit?: 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, page, limit, bucket });
    
          if (type === "timeseries") {
            if (!errorMessage) {
              return {
                content: [{ type: "text" as const, text: "Error: errorMessage is required for type='timeseries'. Use type='names' first to discover error messages, then pass one to errorMessage." }],
                isError: true,
              };
            }
            params.errorMessage = errorMessage;
            const data = await client.get<unknown[]>(
              `/sites/${siteId}/error-bucketed`,
              params
            );
            return {
              content: [{ type: "text" as const, text: truncateResponse(data) }],
            };
          }
    
          if (type === "events") {
            if (!errorMessage) {
              return {
                content: [{ type: "text" as const, text: "Error: errorMessage is required for type='events'. Use type='names' first to discover error messages, then pass one to errorMessage." }],
                isError: true,
              };
            }
            params.errorMessage = errorMessage;
            const data = await client.get<ErrorEvent[]>(
              `/sites/${siteId}/error-events`,
              params
            );
            return {
              content: [{ type: "text" as const, text: truncateResponse(data) }],
            };
          }
    
          const data = await client.get<ErrorName[]>(
            `/sites/${siteId}/error-names`,
            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 rybbit_get_errors, combining analyticsInputSchema, paginationSchema, and custom fields (type, errorMessage, bucket)
    inputSchema: {
      ...analyticsInputSchema,
      ...paginationSchema,
      type: z
        .enum(["names", "events", "timeseries"])
        .optional()
        .describe(
          "'names' for error type summary with counts, 'events' for individual error instances with stack traces, 'timeseries' for error count trends over time for a specific error. Default: names"
        ),
      errorMessage: z
        .string()
        .optional()
        .describe("Error message filter (required for type='events' and type='timeseries'). Use type='names' first to discover error messages."),
      bucket: z
        .enum(["minute", "five_minutes", "hour", "day", "week", "month"])
        .optional()
        .describe("Time bucket for timeseries type (default: day)"),
    },
  • Shared analyticsInputSchema and paginationSchema used by the tool (siteId, dates, timeZone, filters, pastMinutes, page, limit)
    export const analyticsInputSchema = {
      siteId: siteIdSchema,
      startDate: z
        .string()
        .optional()
        .describe("Start date in ISO format (YYYY-MM-DD)"),
      endDate: z
        .string()
        .optional()
        .describe("End date in ISO format (YYYY-MM-DD)"),
      timeZone: z
        .string()
        .optional()
        .describe("IANA timezone (e.g., Europe/Prague). Default: UTC"),
      filters: z
        .array(filterSchema)
        .optional()
        .describe("Array of filters. Example: [{parameter:'browser',type:'equals',value:['Chrome']},{parameter:'country',type:'equals',value:['US','DE']}]"),
      pastMinutesStart: z
        .number()
        .optional()
        .describe("Alternative to dates: minutes ago start (e.g., 60 = last hour)"),
      pastMinutesEnd: z
        .number()
        .optional()
        .describe("Alternative to dates: minutes ago end (default 0 = now)"),
    };
    
    export const bucketSchema = z
      .enum([
        "minute",
        "five_minutes",
        "ten_minutes",
        "fifteen_minutes",
        "hour",
        "day",
        "week",
        "month",
        "year",
      ])
      .optional()
      .describe("Time bucket granularity (default: day). Use 'hour' for last 24h, 'week'/'month' for long ranges");
    
    export const paginationSchema = {
      page: z.number().int().min(1).optional().describe("Page number, 1-indexed (default: 1)"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(200)
        .optional()
        .describe("Results per page (default: 20-50 depending on endpoint, max 200)"),
    };
  • src/index.ts:44-44 (registration)
    Top-level registration call that wires registerErrorsTools into the MCP server setup
    registerErrorsTools(server, client);
Behavior4/5

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

Annotations indicate readOnly, destructive, idempotent, and openWorld hints. The description adds behavioral context beyond annotations by detailing the multi-step process and the necessity of errorMessage for certain types.

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?

Three sentences with a numbered workflow; concise and front-loaded, no unnecessary words.

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?

Given the tool's complexity (12 parameters, 3 types) and no output schema, the description provides a useful high-level workflow. It covers the main usage patterns but could mention error message discovery more explicitly.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value by explaining the role of 'type' and 'errorMessage' in the workflow, complementing the schema's parameter descriptions.

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 'Get error tracking data' and outlines a three-step workflow (names, events, timeseries), distinguishing it from sibling tools that deal with events or other analytics.

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 provides a step-by-step workflow: use type='names' to discover error types, then type='events' with errorMessage for instances, and type='timeseries' for trends. It explains the requirement for errorMessage in events and timeseries, but does not explicitly compare to sibling 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