Skip to main content
Glama
MissionSquad

MCP Avantage

by MissionSquad

forex_exchangeRates

Get real-time exchange rates for currency pairs to calculate conversion values for international transactions or financial analysis.

Instructions

Fetches the realtime exchange rate for a currency pair (e.g., EUR to USD).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_currencyYesThe currency symbol to convert from (e.g., "EUR").
to_currencyYesThe currency symbol to convert to (e.g., "USD").

Implementation Reference

  • The handler and registration for the 'forex_exchangeRates' tool. The execute function calls executeAvantageTool, which invokes the Alpha Vantage forex.exchangeRates API with from_currency and to_currency parameters.
    server.addTool({
      name: "forex_exchangeRates",
      description:
        "Fetches the realtime exchange rate for a currency pair (e.g., EUR to USD).",
      parameters: schemas.ForexExchangeRateParamsSchema,
      execute: (
        args,
        context // Let type be inferred
      ) =>
        executeAvantageTool("forex_exchangeRates", args, context, (av, params) =>
          av.forex.exchangeRates(params.from_currency, params.to_currency)
        ),
    });
  • Zod schema defining input parameters for the forex_exchangeRates tool: from_currency and to_currency.
    export const ForexExchangeRateParamsSchema = z.object({
        from_currency: z.string().describe('The currency symbol to convert from (e.g., "EUR").'),
        to_currency: z.string().describe('The currency symbol to convert to (e.g., "USD").'),
    }).describe('Parameters for fetching Forex exchange rates.')
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/MissionSquad/mcp-avantage'

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