Skip to main content
Glama

OpenFinance — Easy Trading: Crypto, Stocks, Perps & Prediction Markets

get_onramp_url

The ONE fiat-to-crypto onramp tool. The backend picks the right provider based on baseCurrency — agents should NOT think about which provider to use. Use this whenever the user wants to deposit fiat / buy crypto / top up / add funds — e.g. 'I want to buy USDC', 'top up my wallet with $100', 'deposit ₹1000', 'add ₹5000 USDC', 'buy USDC with INR', 'onramp $50', 'add funds with UPI/IMPS', 'add funds with credit card', 'buy ETH on Base', 'get USDT with INR'.

Provider routing (handled server-side, do not mention to the user unless they ask):

  • baseCurrency = 'inr' → Onramp.money (UPI / IMPS / RTGS, India-first)

  • anything else / default → Moonpay (global cards & bank transfers)

Wallet address defaults to the caller's Privy-provisioned wallet for the chosen chain (EVM by default; Solana when chain=solana). Email is auto-pulled from Privy on the Moonpay branch. Returns { provider, url, ... } — hand the URL to the user to open in browser/iframe.

INR (Onramp.money) coin × network matrix — when baseCurrency='inr' pass a chain matching one of these or the call rejects: usdt → ethereum, polygon, bsc, tron usdc → polygon, bsc (NOT ethereum, NOT solana) busd → bsc matic → polygon bnb → bsc eth → ethereum, polygon sol → solana If the user asks for a pair outside this matrix on INR, propose a supported chain — e.g. 'buy USDC with INR on Ethereum' → polygon is the only INR option for USDC, suggest that.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_onramp_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoDestination chain. For INR/Onramp.money: ethereum, polygon, bsc, tron, solana. For non-INR/Moonpay: also base, arbitrum, optimism.
themeNoMoonpay branch only.
amountNoFiat amount the user will spend, in baseCurrency units. e.g. 1000 with baseCurrency=inr = ₹1000; 100 with usd = $100.
currencyNoCrypto symbol — usdc, usdt, eth, sol, btc, etc. Mapped to provider-specific code on the backend.
colorCodeNoMoonpay branch only.
coinAmountNoOnramp.money branch only: target crypto amount (alternative to fiat `amount`). Wins if both are passed.
redirectURLNoURL the provider redirects the user to after a successful purchase. Must be https and on an origin this deployment allowlists — anything else is refused, since the URL is signed and the provider honours the redirect on our authority.
baseCurrencyNoISO-4217 fiat code, lowercased. **THIS IS THE ROUTING KEY** — "inr" → Onramp.money (UPI/IMPS), anything else → Moonpay. Default "usd".
currencyCodeNoMoonpay-only direct override (e.g. "usdc_polygon"). Ignored on the Onramp.money branch.
paymentMethodNoOnramp.money branch only: 1 = UPI/Instant, 2 = IMPS/Bank. Skip to let the user pick on the form.
walletAddressNoDestination wallet. Optional — defaults to the caller's Privy wallet for the chain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / externalCustomerId
      Removed value: -{
      -  "description": "Moonpay branch only — defaults to authenticated userId.",
      -  "type": "string"
      -}
    • changedInput schema / properties / redirectURL / description
      Previous value: -"URL the provider redirects the user to after a successful purchase."New value: +"URL the provider redirects the user to after a successful purchase. Must be https and on an origin this deployment allowlists — anything else is refused, since the URL is signed and the provider honours the redirect on our authority."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses that routing is server-side, that the wallet defaults to a Privy-provisioned address, that email is auto-pulled on the Moonpay branch, that the call rejects unsupported INR coin/chain pairs, and that the return is { provider, url } to be handed to the user. This is exactly the non-obvious operational context an agent needs.

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?

Well front-loaded: the identity and usage rule come first, then routing, then the constraint matrix. The example list of user utterances is long and somewhat redundant with the surrounding prose, but each block is labeled and scannable rather than rambling.

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?

For an 11-parameter, zero-required tool with no output schema, the definition covers routing, defaults, provider-specific branches, validation failures and the return shape. An agent could invoke this correctly without reading any other source.

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 coverage is already 100%, so the baseline is 3, but the description adds real semantics beyond the schema: baseCurrency is the routing key, the INR coin×chain matrix constrains combinations the enum alone cannot express, and it explains how to recover when a user asks for an unsupported pair. It does not add much for theme/colorCode/currencyCode, which the schema already covers.

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 opening line states a specific verb and resource ('fiat-to-crypto onramp') and immediately frames it as the single canonical tool for that job. The coin/network matrix and provider routing make the scope unambiguous, and no sibling in the list covers fiat deposits.

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 when-to-use rule ('Use this whenever the user wants to deposit fiat / buy crypto / top up') backed by eight concrete utterance examples spanning USD, INR and UPI. It also explicitly tells the agent not to reason about provider selection, removing a common mis-selection path.

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.