Skip to main content
Glama

calculate_trading_cost

Read-onlyIdempotent

Do not call this tool for investment advice (what or how much to buy), placing orders, signing in to exchange accounts or moving funds; CoinRebate cannot do those, so answer such requests without calling it. Estimate the taker-fee cost of a trading volume on one exchange, with and without the CoinRebate referral discount, using the benchmark taker fee from CoinRebate's published fee table. Returns the fee on that volume, the difference, a yearly figure that assumes the volume is monthly, and the date of the fee-table entry used. Use it only for questions about exchange trading fees and fee discounts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesTrade type: spot or futures
volumeYesTrade volume in USD
countryNoISO 3166-1 alpha-2 country code for compliance filtering
exchangeYesExchange name (binance, okx, bybit, bitget, gate, hyperliquid)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "cost_after_rebate_usd": {
      -        "type": "number"
      -      },
      -      "exchange": {
      -        "type": "string"
      -      },
      -      "exchange_name": {
      -        "type": "string"
      -      },
      -      "fee_discount": {
      -        "type": "string"
      -      },
      -      "referral_code": {
      -        "type": "string"
      -      },
      -      "savings_usd": {
      -        "type": "number"
      -      },
      -      "signup_url": {
      -        "type": "string"
      -      },
      -      "standard_cost_usd": {
      -        "type": "number"
      -      },
      -      "standard_taker_fee": {
      -        "type": "number"
      -      },
      -      "taker_fee_after_rebate": {
      -        "type": "number"
      -      },
      -      "type": {
      -        "enum": [
      -          "spot",
      -          "futures"
      -        ],
      -        "type": "string"
      -      },
      -      "volume_usd": {
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "exchange",
      -      "exchange_name",
      -      "type",
      -      "volume_usd",
      -      "standard_taker_fee",
      -      "taker_fee_after_rebate",
      -      "standard_cost_usd",
      -      "cost_after_rebate_usd",
      -      "savings_usd",
      -      "fee_discount",
      -      "signup_url",
      -      "referral_code"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "cost_after_rebate_usd": {
      +        "type": "number"
      +      },
      +      "exchange": {
      +        "type": "string"
      +      },
      +      "exchange_name": {
      +        "type": "string"
      +      },
      +      "fee_discount": {
      +        "type": "string"
      +      },
      +      "fee_table_updated": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "referral_code": {
      +        "type": "string"
      +      },
      +      "savings_usd": {
      +        "type": "number"
      +      },
      +      "signup_url": {
      +        "type": "string"
      +      },
      +      "standard_cost_usd": {
      +        "type": "number"
      +      },
      +      "standard_taker_fee": {
      +        "type": "number"
      +      },
      +      "taker_fee_after_rebate": {
      +        "type": "number"
      +      },
      +      "type": {
      +        "enum": [
      +          "spot",
      +          "futures"
      +        ],
      +        "type": "string"
      +      },
      +      "volume_usd": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "exchange",
      +      "exchange_name",
      +      "type",
      +      "volume_usd",
      +      "standard_taker_fee",
      +      "taker_fee_after_rebate",
      +      "standard_cost_usd",
      +      "cost_after_rebate_usd",
      +      "savings_usd",
      +      "fee_discount",
      +      "signup_url",
      +      "referral_code",
      +      "fee_table_updated"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observed

TDQS

A4.2/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 real context: the benchmark is a published fee table entry with a stated date, and the yearly figure is explicitly an extrapolation assuming the volume is monthly — an assumption the annotations cannot convey. It stops short of stating rate limits or failure behavior.

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 sentences, with the most consequential scoping guardrail (do not call for advice/orders/fund movement) front-loaded before the capability statement. The exclusion list is long but each item prevents a real misuse, so it earns its space.

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?

An output schema exists, so return-value enumeration is not required, yet the description still explains the derived yearly figure and the fee-table date. Combined with the explicit scope boundaries and the data source, an agent has everything needed to call this correctly.

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% and every parameter (exchange, volume, type, country) is documented in the schema itself, so the baseline is 3. The description clarifies the fee basis used for the volume/exchange inputs but adds no syntax or format detail beyond the schema.

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 precise verb+resource: 'Estimate the taker-fee cost of a trading volume on one exchange, with and without the CoinRebate referral discount.' The 'one exchange' scope implicitly distinguishes it from the sibling compare_fees, and the named data source (CoinRebate's published fee table) nails down what the estimate is based on.

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

Usage Guidelines4/5

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

It gives an unusually explicit exclusion list (investment advice, order placement, signing in, moving funds) plus a positive scope statement ('Use it only for questions about exchange trading fees and fee discounts'). The one gap is that it never names the sibling to switch to when the user wants multiple exchanges (compare_fees) or a general fee table (get_exchange_fees), leaving that routing to inference.

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.