Skip to main content
Glama

AfriRate

Convert an amount between currencies

convert
Read-only

Convert an amount between two currencies using published African rates. Tries the direct pair, then the inverse, then a cross through USD, and tells you which path it used and which source it trusted. No AfriRate endpoint does this — it is computed here. Passing country when you know it costs one upstream request instead of up to six, which matters against a 10-per-minute budget.

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

Input Schema

NameRequiredDescriptionDefault
toYesCurrency to convert to, e.g. ZWG
fromYesCurrency to convert from, e.g. USD
amountYesAmount to convert
sourceNoRestrict to one source by its code as get_rate shows it, e.g. rbz or cbk. Usually leave this out.
countryNoRestrict to sources from this country, e.g. ZW for the RBZ official rate

Output Schema

NameRequiredDescriptionDefault
toYes
fromYes
pathYes
rateYes
as_ofYes
staleYes
amountYes
resultYes
sourcesYes
age_daysYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the readOnly/openWorld annotations: discloses the fallback resolution chain (direct → inverse → USD cross), that the response reports which path and source were used, that the result is computed rather than served by an endpoint, and that there is a 10-per-minute upstream budget with per-parameter request costs. This is exactly the operational context annotations cannot carry.

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 sentences, front-loaded with the core action, then resolution strategy, then the cost tip. Every sentence carries information; the only mild padding is the closing budget rationale, which is still decision-relevant.

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?

With 5 parameters, an output schema present, and only readOnly/openWorld annotations, this description supplies the missing pieces: computation semantics, fallback ordering, rate-limit constraints, and the request-cost tradeoff. Nothing an agent needs to call it correctly is absent.

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 already documents all five parameters (100% coverage, baseline 3), and the description adds real meaning on top: `country` reduces upstream calls from up to six to one, which is a performance consequence not stated in the schema. `source` and the conversion semantics themselves are left to the schema text.

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 between two currencies using published African rates') plus scope and mechanism (direct, inverse, USD cross). The sentence 'No AfriRate endpoint does this — it is computed here' separates it from get_rate/get_gold style single-datum siblings without naming them ambiguously.

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?

Makes clear this is the tool for computed conversion rather than raw rate retrieval, and gives a concrete cost-based rule for supplying `country` (one upstream request vs up to six). It does not state explicit when-not conditions or name a sibling to use instead for plain rate lookup, leaving that inference to the agent.

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.