Skip to main content
Glama

Get Chart / Analytics Data

openpanel_get_chart
Read-onlyIdempotent

Query aggregated OpenPanel analytics to chart metrics, trends, and breakdowns by event, date range, interval, filters, and dimensions, with optional previous-period comparison.

Instructions

Query aggregated analytics data from OpenPanel. Use this for metrics, trends, and breakdowns.

Args:

  • project_id (string, optional): OpenPanel project ID. If omitted, uses the project linked to your client credentials.

  • events (array, required): Events to analyze. Each: { name, segment?, filters? }

    • name (string): Event name (e.g. 'page_view', 'purchase')

    • segment (string, optional): 'event' | 'user' | 'session' | 'property_sum' | 'property_average'

    • filters (array, optional): [{ name, operator, value[] }]

      • operator: 'is' | 'isNot' | 'contains' | 'doesNotContain' | 'gt' | 'gte' | 'lt' | 'lte' | 'regex'

  • breakdowns (array, optional): [{ name }] - Properties to break down by (e.g. 'browser', 'country')

  • interval (string, optional): 'minute' | 'hour' | 'day' | 'week' | 'month' (default: 'day')

  • range (string, optional): Time range, e.g. '7d', '30d', '90d', '1y' (default: '30d')

  • start_date (string, optional): Custom start date (ISO). Overrides range.

  • end_date (string, optional): Custom end date (ISO). Overrides range.

  • previous (boolean, optional): Include previous period comparison (default: false)

Returns: Chart data with time series, aggregated values, and breakdowns.

Examples:

  • Page views last 7 days: events=[{name:"page_view"}], range="7d"

  • Signups by country: events=[{name:"signup"}], breakdowns=[{name:"country"}]

  • Unique users per week: events=[{name:"session_start", segment:"user"}], interval="week"

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "events": "<events>"
    },
    "name": "openpanel_get_chart"
  }
}

Input Schema

NameRequiredDescriptionDefault
rangeNoTime range (e.g. '7d', '30d', '90d', '1y'). Default: '30d'30d
eventsYesEvents to include in the chart
end_dateNoCustom end date (ISO format). Overrides range.
intervalNoTime interval for data aggregation (default: 'day')day
previousNoInclude previous period for comparison (default: false)
breakdownsNoDimensions to break down the data by
project_idNoOpenPanel project ID. Optional — if omitted, uses the project linked to your client credentials.
start_dateNoCustom start date (ISO format). Overrides range.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world behavior, so the bar is low. The description still adds real value: default values for interval and range, the precedence rule that start_date/end_date override range, and the shape of what comes back ('time series, aggregated values, and breakdowns'). It does not discuss pagination or limits, which for large time ranges would matter.

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

Conciseness4/5

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

It is front-loaded with purpose, then structured into Args, Returns, and Examples, which is easy to scan. The Args block is partially redundant with an already-complete schema, but the examples justify the length and the enumerated filter operators are cheap to skim.

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?

For an 8-parameter analytics query with no output schema, the description covers purpose, defaults, date-override precedence, the return shape, and worked examples. The remaining gap is volume/limit behavior and how large ranges are handled, which an agent would want to know before issuing a '1y' minute-interval query.

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%, so the baseline is 3 and the description mostly restates the Args already documented in the schema. The one piece of genuine added meaning is the example mapping segment:'user' to 'Unique users per week', which tells the agent how a segment value translates into an analytical result.

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?

The opening sentence gives a specific verb and resource ('Query aggregated analytics data from OpenPanel') and adds a scope signal ('metrics, trends, and breakdowns'). This implicitly separates it from the ingestion-oriented siblings like openpanel_track_event and openpanel_get_events, though no sibling is named explicitly.

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?

'Use this for metrics, trends, and breakdowns' gives an implied use case, and the three worked examples clarify typical analytical intents. However, there is no explicit when-not guidance and no mention of the raw-event alternative (openpanel_get_events) for row-level data, leaving the agent to infer the boundary.

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