Skip to main content
Glama

Diogenes Web3, DeFi & 402 Security MCP

Cross-Asset Spot Exchange Rate & Satoshi Conversion Calculator

calculate_spot_swap_rate
Read-onlyIdempotent

Calculates instantaneous spot exchange rates and equivalent USD, BTC, and satoshi values across BTC, ETH, SOL, SUI, and USDC. Use when converting a token amount into USD or satoshis for invoice pricing or accounting; for quoting executable non-KYC cross-chain bridge routes with bridge fees and settlement times, use compare_crosschain_bridge_routes instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'currency' ('amount' defaults to 'standard'), supports '?demo=true' or L402 (20 sats), and returns HTTP 400 if invalid.

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": {
      "currency": "<currency>"
    },
    "name": "calculate_spot_swap_rate"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNoQuantity of the source asset to convert; defaults to 100 when omitted.
currencyYesSource asset ticker symbol to convert from.

Output Schema

NameRequiredDescriptionDefault
source_amountYesInput asset quantity.
equivalent_satsYesEquivalent value denominated in Bitcoin satoshis.
source_currencyYesInput asset symbol converted.
total_usd_valueYesEquivalent spot value in US Dollars (USD).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations (which already establish readOnly/idempotent/non-destructive) by disclosing statelessness, a 32 KB payload cap, a 60 RPM rate limit, the '?demo=true' and L402 (20 sats) access paths, and the HTTP 400 failure mode. These are operational traits an agent cannot infer from structured fields.

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?

Three tight sentences, front-loaded with purpose before usage and then operational constraints; nothing is repeated from the annotations. Slight density cost from bundling rate limit, payment scheme, and error code into one sentence, but each clause carries distinct information.

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 stateless two-parameter read with an output schema (so return shape need not be described), the description covers access modes, limits, and failure behavior adequately. The only real gap is the muddled statement about the amount default, which leaves a caller unsure of the exact fallback value.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description's parenthetical 'amount' defaults to 'standard'' conflicts with the schema, which documents 'defaults to 100 when omitted'. That is confusing rather than additive, and 'standard' is not a value in the numeric amount domain; the only real gain is naming the 'currency' argument.

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?

States a specific verb ('Calculates') and resource ('instantaneous spot exchange rates and equivalent USD, BTC, and satoshi values'), and enumerates the supported assets. It also explicitly names the sibling it is not (compare_crosschain_bridge_routes), so an agent can disambiguate without opening either schema.

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?

Gives a concrete when-to-use trigger ('converting a token amount into USD or satoshis for invoice pricing or accounting') and an explicit alternative with its own condition ('for quoting executable non-KYC cross-chain bridge routes... use compare_crosschain_bridge_routes instead'). Both the positive and negative selection cases are covered.

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.