Skip to main content
Glama

x402-roi

ROI: Calculate Return on Investment as a percentage. Provide cost (or investment) and gain (or return).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
costNoCost to process
gainNoGain to process
returnNoReturn to process
investmentNoInvestment to process

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / cost
      Added value: +{
      +  "description": "Cost to process",
      +  "type": "string"
      +}
    • addedInput schema / properties / gain
      Added value: +{
      +  "description": "Gain to process",
      +  "type": "string"
      +}
    • addedInput schema / properties / investment
      Added value: +{
      +  "description": "Investment to process",
      +  "type": "string"
      +}
    • addedInput schema / properties / return
      Added value: +{
      +  "description": "Return to process",
      +  "type": "string"
      +}
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden, but for an arithmetic tool the only real disclosure needed is the output form — and it does state the result is a percentage. It adds nothing about edge cases (zero cost, negative return) or the aliasing behavior, which is the main behavioral unknown.

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?

Two short sentences, front-loaded with the verb and output type, with zero filler. Efficient, though the alias hint could be slightly more explicit about precedence.

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

Completeness3/5

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

For a no-annotation, no-output-schema arithmetic tool this covers the basics: what it computes and the units of the result. Missing are the alias-resolution rule and any mention of result shape, which leaves a small gap for an agent filling the schema.

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 baseline is 3, but the description genuinely adds meaning by pairing the aliases: cost (or investment) and gain (or return), telling the agent the four schema fields are two logical pairs. It still doesn't say what happens if both members of a pair are supplied.

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?

States a specific verb and resource ('Calculate Return on Investment as a percentage'), which is clear on its own. However, the sibling list contains x402-roi-calc, x402-holding-period-return, x402-annualized-return and x402-irr-calc, and the description never distinguishes itself from those near-identical siblings.

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 gives no when-to-use context, no prerequisites, and no guidance on choosing this over x402-roi-calc or the other return-calculation siblings. Usage is only implied by the tool name.

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