Skip to main content
Glama
yantrix-ai

@praveen030686/data-apis-mcp

Convert Currency

finance_forex_convert
Read-onlyIdempotent

Convert currency amounts using live forex rates with x402 USDC micropayments on Base.

Instructions

Convert an amount from one currency to another using live forex rates. Costs $0.02 USDC per request via x402 on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesSource currency code (e.g., USD, EUR, GBP)
toYesTarget currency code (e.g., INR, JPY, EUR)
amountYesAmount to convert

Implementation Reference

  • Registration and handler implementation for the finance_forex_convert tool.
    server.registerTool(
      "finance_forex_convert",
      {
        title: "Convert Currency",
        description: `Convert an amount from one currency to another using live forex rates.
    Costs $0.02 USDC per request via x402 on Base.`,
        inputSchema: {
          from: z.string().min(3).max(3).describe("Source currency code (e.g., USD, EUR, GBP)"),
          to: z.string().min(3).max(3).describe("Target currency code (e.g., INR, JPY, EUR)"),
          amount: z.number().positive().describe("Amount to convert"),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
      },
      async ({ from, to, amount }) => {
        const data = await apiPost(`${FINANCE_API}/api/v1/forex/convert`, { from, to, amount });
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
Behavior4/5

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

Annotations already cover key traits (read-only, non-destructive, idempotent, open-world), but the description adds valuable context beyond this: it discloses the cost per request ('Costs $0.02 USDC per request via x402 on Base'), which is not captured in annotations. No contradiction with annotations.

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?

The description is front-loaded with the core purpose in the first sentence, followed by cost details in the second. Both sentences earn their place by providing essential information without redundancy or fluff.

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?

Given the tool's moderate complexity (3 parameters, no output schema), annotations cover safety and idempotency, and the description adds cost information. However, it lacks details on rate limits, error handling, or return format, leaving minor gaps.

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%, with clear parameter descriptions in the schema. The description does not add meaning beyond the schema (e.g., it doesn't explain parameter interactions or provide examples), so it meets the baseline of 3.

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 clearly states the specific action ('Convert an amount from one currency to another') and resource ('using live forex rates'), distinguishing it from sibling tools like finance_forex_rate (which likely provides rates without conversion) and finance_stock_price (which deals with stocks, not forex).

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?

The description implies usage context (currency conversion with live rates) but does not explicitly state when to use this tool versus alternatives like finance_forex_rate or other finance tools. No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yantrix-ai/x402-apis-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server