Skip to main content
Glama

AI Agent Analytics

Get agent revenue evidence

get_revenue
Read-onlyIdempotent

Return settled-revenue intelligence for product_id over a trailing days window. Use this for actual settled commerce; do not use it for a headline daily snapshot, use get_daily_pulse, or for a complete bounded-window funnel, use get_report. days defaults to 30 and includes the current partial UTC day plus the preceding 29 days. Requires analytics:read; challenges and attempts are not revenue, settlement remains distinct from delivery, unlike money is never combined, and the shared MCP limit is 300 calls per 60 seconds per caller before HTTP 429 with Retry-After.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoLookback length in whole days, 1 through 90 inclusive. Defaults to 30 when omitted.
product_idYesExact AI Agent Analytics product/property ID returned by list_products. Do not pass a product name, URL, or organization ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYesDelegated response schema identifier.
productYes
revenueYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedOutput schema / properties / product / properties / id / description
      Previous value: -"Product/property ID."New value: +"Tenant-checked product/property ID."
    • changedOutput schema / properties / product / properties / time_zone / description
      Previous value: -"IANA time zone used for product-local daily interpretation."New value: +"IANA time zone used for product-local interpretation."
    • addedOutput schema / properties / revenue / additionalProperties
      Added value: +{}
    • removedOutput schema / properties / revenue / description
      Removed value: -"Settled-revenue intelligence with money kept in separate currency, asset, and network buckets."
    • addedOutput schema / properties / revenue / properties
      Added value: +{
      +  "delivery_evidence_rate": {
      +    "anyOf": [
      +      {
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  },
      +  "funnel": {
      +    "additionalProperties": {},
      +    "description": "Countable-external observed stage events; not unique customers.",
      +    "properties": {
      +      "delivered": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "found": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "interested": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "payment_attempts": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "payment_challenges": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "returned": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "settled": {
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "found",
      +      "interested",
      +      "payment_challenges",
      +      "payment_attempts",
      +      "settled",
      +      "delivered",
      +      "returned"
      +    ],
      +    "type": "object"
      +  },
      +  "generated_at": {
      +    "description": "UTC end of the observed revenue window.",
      +    "type": "string"
      +  },
      +  "integrity": {
      +    "additionalProperties": {},
      +    "properties": {
      +      "funnel_unit": {
      +        "type": "string"
      +      },
      +      "note": {
      +        "type": "string"
      +      },
      +      "source_completeness_proven": {
      +        "type": "boolean"
      +      },
      +      "strict_external_only": {
      +        "type": "boolean"
      +      },
      +      "unknown_external_revenue_excluded": {
      +        "type": "boolean"
      +      },
      +      "unlike_money_not_combined": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "strict_external_only",
      +      "unknown_external_revenue_excluded",
      +      "unlike_money_not_combined",
      +      "funnel_unit",
      +      "source_completeness_proven",
      +      "note"
      +    ],
      +    "type": "object"
      +  },
      +  "largest_observed_dropoff": {
      +    "anyOf": [
      +      {
      +        "additionalProperties": {},
      +        "properties": {
      +          "evidence_level": {
      +            "type": "string"
      +          },
      +          "from_count": {
      +            "maximum": 9007199254740991,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "from_stage": {
      +            "type": "string"
      +          },
      +          "lost": {
      +            "maximum": 9007199254740991,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "to_count": {
      +            "maximum": 9007199254740991,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "to_stage": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "evidence_level",
      +          "from_stage",
      +          "to_stage",
      +          "from_count",
      +          "to_count",
      +          "lost"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  },
      +  "property_id": {
      +    "description": "Product/property ID.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "revenue_buckets": {
      +    "additionalProperties": {
      +      "type": "string"
      +    },
      +    "description": "Settled minor-unit amounts keyed by an exact currency/asset/network identity; unlike money is never combined.",
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "schema_version": {
      +    "description": "Revenue-intelligence schema version.",
      +    "type": "string"
      +  },
      +  "settled_receipts": {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "settled_with_delivery_evidence": {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "unknown_external_settlements": {
      +    "description": "Settlements excluded from verified revenue because actor evidence is unresolved.",
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "window": {
      +    "additionalProperties": {},
      +    "properties": {
      +      "current_day_partial": {
      +        "type": "boolean"
      +      },
      +      "end": {
      +        "description": "UTC end of the revenue lookback.",
      +        "type": "string"
      +      },
      +      "lookback_days": {
      +        "maximum": 90,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "start": {
      +        "description": "UTC start of the revenue lookback.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "start",
      +      "end",
      +      "lookback_days",
      +      "current_day_partial"
      +    ],
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / revenue / required
      Added value: +[
      +  "schema_version",
      +  "property_id",
      +  "generated_at",
      +  "window",
      +  "funnel",
      +  "revenue_buckets",
      +  "settled_receipts",
      +  "settled_with_delivery_evidence",
      +  "delivery_evidence_rate",
      +  "unknown_external_settlements",
      +  "largest_observed_dropoff",
      +  "integrity"
      +]
    • addedOutput schema / properties / revenue / type
      Added value: +"object"
    • changedOutput schema / properties / schema / description
      Previous value: -"Response schema identifier."New value: +"Delegated response schema identifier."
  2. Changed3 schema fields changed
    • changedInput schema / properties / days / description
      Previous value: -"Lookback window in days, from 1 to 90."New value: +"Lookback length in whole days, 1 through 90 inclusive. Defaults to 30 when omitted."
    • changedInput schema / properties / product_id / description
      Previous value: -"AI Agent Analytics product/property ID from list_products."New value: +"Exact AI Agent Analytics product/property ID returned by list_products. Do not pass a product name, URL, or organization ID."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "product": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "id": {
      +          "description": "Product/property ID.",
      +          "type": "string"
      +        },
      +        "name": {
      +          "description": "Product name.",
      +          "type": "string"
      +        },
      +        "time_zone": {
      +          "description": "IANA time zone used for product-local daily interpretation.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "name",
      +        "time_zone"
      +      ],
      +      "type": "object"
      +    },
      +    "revenue": {
      +      "description": "Settled-revenue intelligence with money kept in separate currency, asset, and network buckets."
      +    },
      +    "schema": {
      +      "description": "Response schema identifier.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "schema",
      +    "product",
      +    "revenue"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses meaningful behavioral details: the auth requirement, the 300-calls-per-60-seconds rate limit with HTTP 429 and Retry-After behavior, and the semantic distinction that challenges/attempts are not revenue and settlement differs from delivery. These details are not available in the schema or annotations and materially affect invocation expectations.

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 dense but every sentence earns its place: purpose, exclusivity guidance, default window behavior, auth, business semantics, and rate limits. It front-loads the primary action and immediately routes the agent away from incorrect sibling usage. No filler or redundant restatements.

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?

Given the output schema exists and annotations cover safety, the description fills all remaining contextual gaps: when to use, when not to use, defaults, auth, rate limiting, and revenue-specific semantics. An agent has everything needed to select and invoke this tool correctly without guessing.

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 the schema already documents both parameters. The description adds extra semantic value by clarifying that the trailing days window includes the current partial UTC day plus the preceding 29 days, and by reinforcing that product_id must be the exact ID from list_products. This goes slightly beyond the schema's default-value note.

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 states a specific verb and resource: "Return settled-revenue intelligence for product_id over a trailing days window." It clearly distinguishes this tool from siblings by naming get_daily_pulse and get_report as alternatives for different use cases. No ambiguity remains about what the tool does.

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?

The description gives explicit guidance: use this for actual settled commerce, not for headline daily snapshots (get_daily_pulse) or complete bounded-window funnels (get_report). It also states the required analytics:read permission, making it obvious when this tool is appropriate versus when a sibling should be chosen.

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