Skip to main content
Glama

Currencies: Convert an amount

fx_convertCurrency
Read-onlyIdempotent

Convert an amount

amount of from in to at the official rate on date (default: latest). TCMB is used when it publishes both currencies (TRY included), else ECB (EUR included). With TCMB, rateType picks the rate each currency is valued at in TRY: mid (default, the forex buying/selling midpoint), buying or selling. Use to convert an amount between currencies at the official rate, e.g. 100 USD in TRY or 50 EUR in USD.

GET /v1/fx/conversions on Currencies (SBX-FX). Costs 1 credit per call.

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": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "fx_convertCurrency"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesISO 4217 code.
dateNoYYYY-MM-DD. Default: the latest bulletin.
fromYesISO 4217 code.
amountNoDefault 1.
sourceNoForce `tcmb` or `ecb`.
rateTypeNoTCMB only: `mid`, `buying` or `selling`.mid

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, and the description goes well beyond them: it discloses the provider-selection precedence (TCMB over ECB), that TRY is always covered by TCMB and EUR by ECB, how rateType is interpreted per currency, the default-to-latest-bulletin behavior, the underlying endpoint and that each call costs 1 credit. These are operational details an agent cannot obtain from the annotations or schema.

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?

The first line states the operation and the follow-on sentences cover provider rules, rate types, usage example and cost in a logical order. It is dense but front-loaded with purpose; the opening phrase 'Convert an amount `amount` of `from` in `to`' is slightly awkward but not wasteful enough to penalize heavily.

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 six-parameter read tool with no output schema, the description supplies the provider logic, defaults, rate-type behavior, endpoint and credit cost — almost everything needed to invoke it correctly. The notable gap is that it never says what the response contains (converted amount vs. rate vs. both), which matters when no output schema exists.

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 a baseline of 3 applies, but the description adds real meaning the schema does not: rateType only takes effect under TCMB and selects how each currency is valued in TRY, and the `source`/`date` interplay is spelled out as a fallback chain. It does not explain `amount` semantics further, but the marginal value over the schema is genuine.

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 and resource ('Convert an amount `amount` of `from` in `to`') plus the exact rate basis ('at the official rate on `date`'), which cleanly separates it from listing tools like fx_listRates or history tools like fx_getCurrencyHistory. The concrete examples (100 USD in TRY, 50 EUR in USD) remove any ambiguity about the operation.

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?

Explicitly says when to use it ('Use to convert an amount between currencies at the official rate') and explains which rate provider applies under which conditions (TCMB when both currencies are published, otherwise ECB). It stops short of naming a sibling alternative or stating exclusions, so it is clear context rather than full when/when-not guidance.

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