Skip to main content
Glama

Exchange rates by base currency

get_rates_by_base
Read-onlyIdempotent

Return the daily FX snapshot re-based to base: every supported currency quoted as units per 1 unit of base, with base itself at 1. Use when the user wants a multi-currency table in a non-USD base (for example "rates in EUR"). Use get_rates for the USD table, convert for one pair or amount, and get_history for a time series. Omitting date returns the latest available snapshot, which is not necessarily today. Returns { base, date, rates }; an unsupported base or a date with no snapshot is a 404. Requires a signed-in connection; each successful call bills 1 API request.

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": {
      "base": "<base>"
    },
    "name": "get_rates_by_base"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseYesBase currency (3-letter ISO 4217), e.g. EUR.
dateNoYYYY-MM-DD. Defaults to the latest available date.

Output Schema

NameRequiredDescriptionDefault
pppNo
asOfNo
baseYes
dateYes
ratesYes
requestedDateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "asOf": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "base": {
      +      "type": "string"
      +    },
      +    "date": {
      +      "type": "string"
      +    },
      +    "ppp": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "base": {
      +          "type": "string"
      +        },
      +        "values": {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        "year": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "base",
      +        "year",
      +        "values"
      +      ],
      +      "type": "object"
      +    },
      +    "rates": {
      +      "additionalProperties": {
      +        "type": "number"
      +      },
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "requestedDate": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "base",
      +    "date",
      +    "rates"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The annotations already declare a safe read (readOnlyHint true, idempotentHint true, destructiveHint false), so the description focuses on what they cannot convey: that omitting `date` returns the latest available snapshot, which is not necessarily today, that an unsupported base or missing-date snapshot is a 404, that a signed-in connection is required, and that each successful call bills one API request. Those are exactly the operational details an agent needs in order to call it correctly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a short paragraph of focused sentences, front-loaded with what the tool returns and its scoping constraint, followed by the routing alternatives and the operational caveats. No sentence merely restates the tool name or the annotations.

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?

All an agent needs in order to call this tool correctly is present: the re-basing semantics, the meaning of both parameters, the default behavior when `date` is omitted, the error case, the authentication requirement, the cost, and the return shape. The output schema exists, so no further explanation of return values is required.

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 description coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema by explaining what the re-based rates mean (units per one unit of `base`, with `base` itself fixed at 1) and by clarifying that omitting `date` yields the latest snapshot rather than today's date. Format details such as the ISO 4217 and YYYY-MM-DD conventions are left to the schema, which is appropriate.

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 uses a specific verb and resource ("Return the daily FX snapshot re-based to `base`") and precisely states the semantics: every supported currency quoted as units per 1 unit of `base`, with `base` itself at 1. That is enough for an agent to distinguish it from the USD-table, pair-conversion, and time-series siblings without opening the 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?

It gives an explicit trigger ("Use when the user wants a multi-currency table in a non-USD base") and names the alternatives with their conditions: `get_rates` for USD, `convert` for a single pair or amount, and `get_history` for a time series. When to use this tool versus those siblings is fully specified.

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