Skip to main content
Glama

Currency Conversion

currency_conversion
Read-onlyIdempotent

Twelve Data real-time currency conversion: pass a forex pair symbol (e.g. 'EUR/USD') and an amount to get the converted value at the current exchange rate.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "amount": 100,
      "symbol": "EUR/USD"
    },
    "name": "currency_conversion"
  }
}

Input Schema

NameRequiredDescriptionDefault
dpNoDecimal places (0-11).
amountYesAmount in the base currency to convert.
formatNoResponse format: "JSON" (default) or "CSV".
symbolYesTicker/symbol. Stocks e.g. "AAPL", "MSFT"; forex "EUR/USD"; crypto "BTC/USD"; ETFs "SPY". Comma-separate for a batch (e.g. "AAPL,MSFT"). Market indices (SPX, N225, ...) need a Grow-or-higher Twelve Data key passed via _apiKey, the shared key cannot quote them.

Output Schema

NameRequiredDescriptionDefault
rateNo
amountNo
symbolNo
timestampNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / dp / description
      Previous value: -"Decimal places (0–11)."New value: +"Decimal places (0-11)."
    • changedInput schema / properties / symbol / description
      Previous value: -"Ticker/symbol. Stocks e.g. \"AAPL\", \"MSFT\"; forex \"EUR/USD\"; crypto \"BTC/USD\"; ETFs \"SPY\". Comma-separate for a batch (e.g. \"AAPL,MSFT\"). Market indices (SPX, N225, …) need a Grow-or-higher Twelve Data key passed via _apiKey — the shared key cannot quote them."New value: +"Ticker/symbol. Stocks e.g. \"AAPL\", \"MSFT\"; forex \"EUR/USD\"; crypto \"BTC/USD\"; ETFs \"SPY\". Comma-separate for a batch (e.g. \"AAPL,MSFT\"). Market indices (SPX, N225, ...) need a Grow-or-higher Twelve Data key passed via _apiKey, the shared key cannot quote them."
  2. Changed8 schema fields changed
    • changedInput schema / properties / symbol / description
      Previous value: -"Ticker/symbol. Stocks e.g. \"AAPL\", \"MSFT\"; forex \"EUR/USD\"; crypto \"BTC/USD\"; ETFs \"SPY\"; indices \"IXIC\". Comma-separate for a batch (e.g. \"AAPL,MSFT\")."New value: +"Ticker/symbol. Stocks e.g. \"AAPL\", \"MSFT\"; forex \"EUR/USD\"; crypto \"BTC/USD\"; ETFs \"SPY\". Comma-separate for a batch (e.g. \"AAPL,MSFT\"). Market indices (SPX, N225, …) need a Grow-or-higher Twelve Data key passed via _apiKey — the shared key cannot quote them."
    • addedOutput schema / properties / amount
      Added value: +{
      +  "type": "number"
      +}
    • removedOutput schema / properties / code
      Removed value: -{
      -  "description": "Response code",
      -  "type": "number"
      -}
    • removedOutput schema / properties / message
      Removed value: -{
      -  "description": "Response message",
      -  "type": "string"
      -}
    • addedOutput schema / properties / rate
      Added value: +{
      +  "type": "number"
      +}
    • removedOutput schema / properties / status
      Removed value: -{
      -  "description": "Response status",
      -  "type": "string"
      -}
    • addedOutput schema / properties / symbol
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / timestamp
      Added value: +{
      +  "type": "number"
      +}
  3. Changed4 schema fields changed
    • addedInput schema / properties / amount / description
      Added value: +"Amount in the base currency to convert."
    • addedInput schema / properties / dp / description
      Added value: +"Decimal places (0–11)."
    • addedInput schema / properties / format / description
      Added value: +"Response format: \"JSON\" (default) or \"CSV\"."
    • addedInput schema / properties / symbol / description
      Added value: +"Ticker/symbol. Stocks e.g. \"AAPL\", \"MSFT\"; forex \"EUR/USD\"; crypto \"BTC/USD\"; ETFs \"SPY\"; indices \"IXIC\". Comma-separate for a batch (e.g. \"AAPL,MSFT\")."
  4. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "amount": 100,
      +    "symbol": "EUR/USD"
      +  },
      +  {
      +    "amount": 50,
      +    "dp": 2,
      +    "symbol": "GBP/JPY"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "code": {
      +      "description": "Response code",
      +      "type": "number"
      +    },
      +    "message": {
      +      "description": "Response message",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "Response status",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  5. First observed

TDQS

A3.5/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds that the rate is 'real-time' and 'current', which is useful context, but says nothing about rate limits, API-key requirements, or whether the returned rate is timestamped. Since an output schema exists, the missing return-format detail is acceptable.

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?

It is a single front-loaded sentence that leads with the verb and resource and then explains the inputs, with no filler beyond the vendor name. It could have used its remaining space to mention the forex-only versus multi-asset scope instead of the redundant 'Twelve Data real-time' branding.

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 simple two-required-parameter conversion call with full schema coverage, annotations, and an output schema, the description covers the essentials of what the tool does. The one meaningful gap is that it implies forex-pair symbols only, while the schema permits stocks, crypto, batch lists, and indices, which could mislead an agent about supported inputs.

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 four parameters are already documented in the schema, and the description only names two of them with an example ('EUR/USD'). Its framing of the symbol as a 'forex pair' narrows the much broader schema definition, which also allows stocks, crypto, ETFs, batch comma-separated symbols, and indices, so it adds little and slightly constrains meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: convert an amount of a forex pair at the current rate, and it names the required inputs (symbol, amount). It is clear what the tool does, but it never distinguishes itself from the sibling 'exchange_rate' tool, leaving the agent to guess which one to pick for a plain rate lookup.

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?

Usage is only implied by the sentence 'pass a forex pair symbol and an amount', which conveys the basic call shape but gives no explicit when-to-use versus when-not-to-use guidance. There is no mention of the alternative 'exchange_rate' sibling, nor of constraints such as the batch-symbol form or the Grow-or-higher key needed for indices.

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.