Skip to main content
Glama
clamp-sh

Clamp Analytics MCP Server

Official

revenue.summary

Read-only

Get total revenue, customers, orders, and key metrics like MRR, ARR, AOV, and LTV. View per-plan and per-product breakdowns with prior-period comparison for revenue trends.

Instructions

One call that returns the canonical revenue dashboard. Bundles every KPI tile + per-plan + per-product rollup + prior-period comparison into one round-trip. Use this for "how's revenue doing?" questions.

Returns:

  • total_revenue per currency (sum of every Money-typed property in the period)

  • revenue — total in the dominant currency (a flat number)

  • customers — distinct paying users (user_id when identified, else anonymous_id)

  • orders — count of revenue events in the period

  • aov — revenue / orders

  • ltv — mean cumulative revenue per paying customer to date

  • mrr — running balance of mrr_delta through period end (null when not subscription-shaped)

  • arr — mrr × 12 (null when mrr is null)

  • is_subscription — true when any plan carries non-zero mrr_contribution OR the project's running MRR is non-zero

  • has_one_time — true when any non-subscription revenue event landed in the period (mixed sellers have both flags set)

  • plans[] — per-plan rollup: revenue (in period), mrr_contribution (CUMULATIVE MRR balance per plan AT PERIOD END — forward-looking, not the in-period delta), customers

  • products[] — per-product rollup: groups by the reserved product property, falls back to event name when product isn't set

  • comparison — per-metric % change vs the prior period of equal length (revenue, customers, orders, aov, ltv, mrr, arr)

Examples:

  • "how's MRR this month" → period="30d", read mrr + comparison.mrr.change

  • "which plan has the most paying customers" → read plans[], sort by customers

  • "ARPU" → revenue / customers (no top-level field; divide client-side)

  • "top one-time products by revenue" → read products[], already sorted desc

  • "do we have any subscription customers" → read is_subscription

Limitations: MRR/ARR/per-plan mrr_contribution require events to carry the reserved mrr_delta numeric property (set automatically by clamp.revenue() with billing="monthly" or "annual"). MRR is reported only in the project's dominant currency; multi-currency MRR is a future scope. customers uses user_id when present (clamp.identify() was called) and falls back to anonymous_id otherwise — counts are honest but can over-count if a paying customer uses two devices without identifying. For per-channel/per-campaign revenue, use revenue.sum with group_by + attribution_model="first_touch". For cohort retention with NRR, use revenue.retention.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoTarget project ID (e.g. "proj_abc123"). Required when the credential has access to multiple projects. If omitted and only one project is accessible, that project is used automatically. Call `projects.list` to discover available project IDs.
periodNoTime period. Use "today", "yesterday", "7d", "30d", "90d", or a custom range as "YYYY-MM-DD:YYYY-MM-DD" (e.g. "2026-01-01:2026-03-31"). Defaults to "30d".
pathnameNoFilter to a specific page path (e.g. "/pricing", "/blog/my-post"). Must start with /.
utm_sourceNoFilter by UTM source (e.g. "google", "twitter", "newsletter"). Case-sensitive, must match the value in the tracking URL.
utm_mediumNoFilter by UTM medium (e.g. "cpc", "email", "social"). Case-sensitive.
utm_campaignNoFilter by UTM campaign name (e.g. "spring-launch", "product-hunt"). Case-sensitive.
utm_contentNoFilter by UTM content (e.g. "hero-cta", "sidebar-banner"). Case-sensitive.
utm_termNoFilter by UTM term (e.g. "running+shoes"). Case-sensitive.
referrer_hostNoFilter by referrer hostname (e.g. "news.ycombinator.com", "twitter.com", "github.com"). Use this to see what traffic from a specific source did. Must match the value returned by `traffic.breakdown(dimension="referrer_host")` exactly (lowercase, no protocol or path).
countryNoISO 3166-1 alpha-2 country code, uppercase (e.g. "US", "GB", "DE", "NL", "JP"). Filter results to visitors from this country.
regionNoAdministrative region inside a country (e.g. "California", "Bavaria"). Case-sensitive; must match the stored region exactly. Use traffic.breakdown(dimension="region") to discover values.
cityNoCity name (e.g. "San Francisco", "London"). Case-sensitive; must match the stored value. Use traffic.breakdown(dimension="city") to discover values.
device_typeNoDevice category. One of: "desktop", "mobile", "tablet".
browserNoBrowser family (e.g. "Chrome", "Safari", "Firefox"). Use traffic.breakdown(dimension="browser") to discover the exact stored values.
browser_versionNoBrowser version string (e.g. "120.0"). Case-sensitive.
osNoOperating system family (e.g. "macOS", "iOS", "Windows", "Android"). Use traffic.breakdown(dimension="os") to discover stored values.
os_versionNoOS version string (e.g. "14.2"). Case-sensitive.
channelNoTraffic channel. One of: "direct", "organic_search", "organic_social", "paid", "email", "referral".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodYes
currencyYes
revenueYes
customersYes
ordersYes
aovYes
ltvYes
mrrYes
arrYes
is_subscriptionYes
has_one_timeYes
total_revenueYes
comparisonYes
plansYes
productsYes
Behavior5/5

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

Discloses all return fields in detail, limitations (MRR requires mrr_delta, customer counting caveat), and is consistent with readOnlyHint=true annotation. No contradiction.

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?

Well-structured with clear opening, bulleted returns, examples, and limitations. Slightly long but every section serves a purpose. Front-loaded with the core purpose.

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

Completeness5/5

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

Completely covers the tool's behavior with detailed return fields, usage examples, limitations, and alternatives. With 18 parameters and rich output, the description is exhaustive and actionable.

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 coverage is 100%, so baseline is 3. The description does not add new meaning to parameters beyond schema; it references parameters in examples but does not elaborate on individual parameter semantics.

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 returns a revenue dashboard with specific KPIs, and distinguishes from siblings like revenue.sum and revenue.retention by stating when to use those instead.

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance ('Use this for 'how's revenue doing?' questions') and multiple examples for different use cases (MRR, plan breakdown, etc.). Also recommends alternative tools for per-channel revenue or cohort retention.

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/clamp-sh/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server