Skip to main content
Glama
Referalli

@referalli/mcp

Official
by Referalli

roi_summary

Read-only

Calculates credit ROI by comparing what granted credit cost against what it earned, with profit, net, and optional filters. Use it to see real cash paid after credit and know if margins are missing.

Instructions

Credit ROI: what the credit you granted (referee rewards, commission credit) cost and what it earned back. Amounts are integer minor units (cents) in the reporting currency unless currency is given. cashAfterMinor is real money customers paid after receiving credit; creditCostMinor is what the credit cost you; credit is not real money, so never count it as revenue. profitAfterMinor, netMinor and roi are null when no product margin is set (or a payment lacks one): null means unknown, not zero, so tell the user to set their margin instead of estimating. roi is profit divided by credit cost (2.1 = each unit of credit returned 2.1). Optional filters: from/to (ISO date or instant), programId, partnerId, currency.

Input Schema

NameRequiredDescriptionDefault
toNoUp to this instant, or the end of this date (UTC).
fromNoGrants from this ISO date or instant, inclusive.
currencyNoThree-letter code; default the reporting currency.
partnerIdNo
programIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, it discloses two important behaviors: amounts are integer minor units in the reporting currency unless `currency` is set, and null profit/roi means unknown rather than zero, with explicit advice not to estimate. That is real value the annotations don't carry; only the return shape/pagination is left implicit.

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?

Metrics and their meanings are front-loaded, and the critical null/never-count-credit-as-revenue warnings follow before the filter list. It is a dense single block with almost no waste, though splitting the output-field glossary from the caveats would read more cleanly.

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?

With no output schema, the description carries the burden of explaining return values and does so for the key fields and the roi ratio. It does not enumerate the full result set, so an agent still learns some fields only at call time.

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 60% and the description names all five filters plus the currency-unit rule, closer to compensating than merely repeating. However partnerId and programId are listed with no explanation of what they scope, and from/to semantics are already fully covered by the schema.

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 states a specific verb+resource: it reports what granted credit cost versus what it earned back, and defines the core metrics (cashAfterMinor, creditCostMinor, profitAfterMinor, roi). It never names the adjacent roi_trace or roi_patterns tools, so an agent must infer the boundary from the names alone.

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?

It gives a concrete conditional behavior: when profitAfterMinor/netMinor/roi are null, tell the user to set their margin rather than estimate. It also notes the filters are optional. But it never says when to use this summary versus roi_trace or roi_patterns, leaving the sibling choice unguided.

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