Skip to Content
MCPToolsconvert_currency

MCP tool: convert_currency

Convert an exact decimal amount using a stored direct rate. Billable: yes (1 request unit).

This is the only place a currency-conversion capability exists in the product today — there is no POST /v1/convert REST endpoint.

Input

{ "base": "EUR", "quote": "USD", "amount": "100.00" }

amount is a decimal string, never a JSON number. "0" is valid and still charges a unit.

Output — success

{ "base": "EUR", "quote": "USD", "amount": "100.00", "rate": "1.174582", "converted_amount": "117.4582", "as_of": "2026-09-29T11:41:32.241582Z", "type": "direct" }

converted_amount is exact fixed-point decimal multiplication, rounded half-up at 18 fractional digits.

Raw JSON-RPC example

{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "convert_currency", "arguments": { "base": "EUR", "quote": "USD", "amount": "100.00" } } }
{ "jsonrpc": "2.0", "id": 1, "result": { "content": [{ "type": "text", "text": "..." }], "structuredContent": { "base": "EUR", "quote": "USD", "amount": "100.00", "rate": "1.174582", "converted_amount": "117.4582", "as_of": "2026-09-29T11:41:32.241582Z", "type": "direct" } } }

Errors

CodeMeaning
invalid_asset_symbolbase/quote format invalid
invalid_amountamount decimal format invalid (new for this tool)
unsupported_pairSyntactically valid pair, not currently supported
temporarily_unavailableStorage/dependency failure
quota_exceededRequest-unit quota exhausted for the billing period

All errors are returned as CallToolResult{IsError: true} with {code, message, request_id} in structured content (quota_exceeded also carries limit/remaining/reset_at) — not an HTTP status code.