Skip to main content
Glama

Revenue and payments

get_revenue
Read-onlyIdempotent

Revenue for the range with the previous period, refunds, new customers and revenue per visitor; revenue by channel and by channel × plan (credited to the visit before each payment); and the 20 latest payments.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_revenue"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast day, inclusive (YYYY-MM-DD).
fromNoFirst day (YYYY-MM-DD, site time zone). Use with to instead of period.
siteNoSite domain (example.com), id or public id (tb_…). Optional with a site key, or when the account has one site.
periodNoTime range. Default 30d. today, yesterday, 24h, 7d, 30d, 90d, 12m, wtd, mtd, ytd, all.
filtersNoOnly visits that match every filter. A value is "is": {"country": "US"}; a list is "is any of": {"country": ["PT", "ES"]}; an object picks the operator: {"page": {"contains": "/blog"}}, {"channel": {"is_not": ["Direct", "Email"]}}, {"page": {"not_contains": "/admin"}}. Operators: is, is_not, contains, not_contains (case-insensitive). "visitor" is "new" or "returning". "ad" is an ad campaign as "google:<campaign id>" or "meta:<campaign id>" (the visits that the Ads page counts for it). Use "(none)" for empty values; countries take ISO codes or English names.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already establish that this is a safe, read-only, idempotent operation. Beyond that, the description adds meaningful context about result composition, the previous-period comparison, payment attribution logic, and the cap of 20 latest payments. It does not cover pagination, permissions, or rate limits, which keeps it below a 5.

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 a single, front-loaded sentence with no filler; every clause describes a distinct part of the response. Despite its density, it is appropriately sized for a multi-part revenue and payments endpoint.

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 a complex analytics tool with nested filters and no output schema, the description does a good job listing the returned data categories. The schema covers parameters thoroughly and annotations cover safety, so the remaining gaps are minor, such as how filters interact with the revenue attribution logic.

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?

The input schema has 100% description coverage, so parameter semantics are already well documented structurally. The tool description does not add parameter-specific meaning beyond implying a date range and filtering context, so the baseline score of 3 is appropriate.

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 description clearly states the specific resource and scope: revenue over a range, comparison with the previous period, refunds, new customers, revenue per visitor, channel and channel-by-plan revenue, and latest payments. It is clear what the tool returns, though it does not explicitly distinguish itself from analytics siblings such as get_breakdown or get_timeseries.

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

Usage Guidelines2/5

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

The description lists the data returned but gives no explicit guidance on when to use this tool versus alternatives, nor any exclusions or preconditions. An agent can infer it is for revenue reporting because of the content, but there is no stated usage rule.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources