Skip to main content
Glama

api_investment_return

Read-onlyIdempotent

Calculate deterministic stock, ETF and investment profit, fees, distributions and percentage return from user-provided assumptions; no market quotes or recommendations. One call costs 0.01 USDC on Base x402; customer-owned provider credentials use X-Provider-Key header where needed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "entry_price": "<entry_price>",
      "exit_price": "<exit_price>",
      "shares": "<shares>"
    },
    "name": "api_investment_return"
  }
}

Input Schema

NameRequiredDescriptionDefault
sharesYesNumber of shares, greater than zero
exit_priceYesAssumed exit price per share, zero or greater
total_feesNoCombined entry and exit charges, default 0
entry_priceYesAssumed entry price per share, greater than zero
distributions_totalNoTotal received distributions or dividends, default 0

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower; the description still adds non-obvious operational context — a per-call cost of 0.01 USDC on Base x402 and the X-Provider-Key credential header. It does not state rate limits or error/payment-failure behavior, which keeps it short of 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?

Two sentences, zero filler: the calculation scope and its exclusions come first, and the commercial/credential details follow. Nothing is repeated from the schema or annotations.

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 five-parameter, no-output-schema read-only calculator, the definition covers what is computed, what is explicitly out of scope, cost, and authentication. Return-shape details are absent but partially inferable from the enumerated outputs (profit, fees, distributions, percentage return), leaving only a minor gap.

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 description coverage is 100%, so all five parameters (including defaults for total_fees and distributions_total and the positivity constraints) are already documented. The description only frames them collectively as 'user-provided assumptions' and adds no syntax or unit guidance beyond the schema, so the baseline 3 applies.

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 gives a specific verb ('Calculate') tied to concrete outputs (profit, fees, distributions, percentage return) over named asset classes (stock, ETF, investment), and explicitly excludes market quotes and recommendations, which separates it from the market-quote sibling. An agent can tell what it produces without opening the schema.

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?

The phrase 'from user-provided assumptions; no market quotes or recommendations' implicitly scopes usage to hypothetical/what-if calculations and away from live pricing tools. However, no sibling is named and there is no explicit 'use this when / do not use when' routing statement.

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