Skip to main content
Glama
nks-hub

rybbit-mcp

by nks-hub

Outbound Links

rybbit_get_outbound_links
Read-onlyIdempotent

Retrieve outbound link clicks tracked on your site. Shows which external URLs users click and how often, with filters by date, timezone, and dimensions.

Instructions

Get outbound link clicks tracked on the site. Shows which external URLs users are clicking and how often.

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)

Implementation Reference

  • The async handler function that executes the outbound links tool logic. Builds analytics params from args, calls GET /sites/{siteId}/events/outbound, and returns truncated response.
    async (args) => {
      try {
        const params = client.buildAnalyticsParams(args);
        const data = await client.get(`/sites/${args.siteId}/events/outbound`, 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_outbound_links. Spreads analyticsInputSchema (siteId, startDate, endDate, timeZone, filters, pastMinutesStart, pastMinutesEnd) and paginationSchema (page, limit).
    inputSchema: {
      ...analyticsInputSchema,
      ...paginationSchema,
    },
  • Registration of the tool via server.registerTool('rybbit_get_outbound_links', ...) with title 'Outbound Links', read-only annotations, and description.
    server.registerTool(
      "rybbit_get_outbound_links",
      {
        title: "Outbound Links",
        annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true, destructiveHint: false },
        description:
          "Get outbound link clicks tracked on the site. Shows which external URLs users are clicking and how often.",
        inputSchema: {
          ...analyticsInputSchema,
          ...paginationSchema,
        },
      },
      async (args) => {
        try {
          const params = client.buildAnalyticsParams(args);
          const data = await client.get(`/sites/${args.siteId}/events/outbound`, 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,
          };
        }
      }
    );
  • buildAnalyticsParams helper method on RybbitClient used to convert handler args to API query params (start_date, end_date, filters, pagination, etc.).
    buildAnalyticsParams(options: {
      startDate?: string;
      endDate?: string;
      timeZone?: string;
      filters?: FilterParam[];
      pastMinutesStart?: number;
      pastMinutesEnd?: number;
      bucket?: string;
      page?: number;
      limit?: number;
      offset?: number;
    }): QueryParams {
      const params: QueryParams = {};
    
      if (options.startDate) params.start_date = options.startDate;
      if (options.endDate) params.end_date = options.endDate;
      if (options.timeZone) params.time_zone = options.timeZone;
      if (options.filters && options.filters.length > 0) {
        params.filters = JSON.stringify(options.filters);
      }
      if (options.pastMinutesStart !== undefined)
        params.past_minutes_start = options.pastMinutesStart;
      if (options.pastMinutesEnd !== undefined)
        params.past_minutes_end = options.pastMinutesEnd;
      if (options.bucket) params.bucket = options.bucket;
      if (options.page !== undefined) params.page = options.page;
      if (options.limit !== undefined) params.limit = options.limit;
      if (options.offset !== undefined) params.offset = options.offset;
    
      return params;
    }
  • truncateResponse helper used to truncate large API responses to CHARACTER_LIMIT chars.
    export function truncateResponse(data: unknown): string {
      const json = JSON.stringify(data, null, 2);
      if (json.length <= CHARACTER_LIMIT) return json;
    
      if (Array.isArray(data)) {
        const half = Math.max(1, Math.floor(data.length / 2));
        const truncated = data.slice(0, half);
        const result = {
          data: truncated,
          truncated: true,
          truncation_message: `Response truncated from ${data.length} to ${half} items (exceeded ${CHARACTER_LIMIT} char limit). Use pagination (page/limit) or add filters to reduce results.`,
        };
        return JSON.stringify(result, null, 2);
      }
    
      return json.slice(0, CHARACTER_LIMIT) +
        `\n\n[Response truncated at ${CHARACTER_LIMIT} characters. Use filters or pagination to reduce data.]`;
    }
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description carries a lower burden. It adds that results show URLs and click frequency, which is useful but minimal. No mention of pagination behavior, response structure, or rate limits.

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 exceptionally concise with two short sentences, no redundancy, and front-loaded key information. Every word earns its place.

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?

The tool has no output schema, and the description only vaguely mentions showing URLs and frequency. For a tool with 9 parameters and filters, more detail on the expected output format (e.g., list of objects with url and count) would enhance completeness. Annotations provide safety context but not output specifics.

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?

All 9 parameters have descriptions in the input schema (100% coverage), so the description need not add much. It does not provide additional context or constraints beyond the schema, meeting the baseline for high schema coverage.

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 tool retrieves outbound link click data, specifying 'external URLs' and 'how often.' It distinguishes from sibling tools like rybbit_list_events or rybbit_get_errors by focusing on outbound link clicks.

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 does not provide explicit guidance on when to use this tool versus alternatives (e.g., rybbit_list_events for general events). Usage is implied by the tool name and description but lacks when-not-to-use or alternative suggestions.

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