Skip to main content
Glama

get_exchange_rate

Retrieve current fiat currency exchange rates for cryptocurrency trading and financial analysis using real-time data.

Instructions

Get list of fiat currency exchange rates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function implementing the get_exchange_rate tool by fetching data from the Desk3 API endpoint.
    async def get_exchange_rate() -> dict[str, Any]: """ Get list of fiat currency exchange rates. :return: Exchange rate data """ url = 'https://mcp.desk3.io/v1/market/exchangeRate' try: return request_api('get', url) except Exception as e: raise RuntimeError(f"Failed to fetch exchange rate data: {e}")
  • Registration of the 'get_exchange_rate' tool in the MCP server's list_tools handler, including description and empty input schema.
    types.Tool( name="get_exchange_rate", description="Get list of fiat currency exchange rates", inputSchema={ "type": "object", "properties": {}, "required": [], }, ),
  • Dispatch handler in the MCP @server.call_tool that executes get_exchange_rate and returns the result as formatted JSON text content.
    case "get_exchange_rate": try: data = await get_exchange_rate() return [ types.TextContent( type="text", text=json.dumps(data, indent=2), ) ] except Exception as e: raise RuntimeError(f"Failed to fetch exchange rate data: {e}")
  • JSON Schema definition for the tool's input parameters (none required).
    inputSchema={ "type": "object", "properties": {}, "required": [], },

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/desk3/cryptocurrency-mcp-server'

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