Gloam

v1.8.0
io.github.cryptoduke01/gloam Checked 9 hours ago Published 1 day ago

Private stablecoin payments for people and AI agents on mainnet, hosted or local with limits.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

gloam_info About Gloam

What Gloam is, which networks it runs on, and what an agent can do with it. Call this first.

gloam_privacy_status Privacy status

Honest, current privacy posture: what is live, what is not, and how strong the anonymity set is. Agents should check this before assuming what a payment or a swap keeps private.

gloam_swap_quote Quote a private swap

Read only. Price a private swap of one note's value from one asset into another on a Gloam network, with everything that would stop it: price impact and peg on Base and Ethereum, the vault's limits (the refund note must fit, the vault must take what you receive), the vault's cash-out fee read live, and where gas is dear the relay's smallest swap. A private swap hides who swapped; the tokens and the amounts are public. Swap with gloam_execute_private_swap.

ParameterTypeDescription
to *stringWhat you receive: a symbol or a 0x token address ("ETH" is native ETH).
amountnumberHow much to swap, in the asset's units (e.g. 25 for 25 USDC).
fromstringWhat you pay: a symbol ("USDG", "USDC", "ETH") or a 0x token address. Left out with a note handle: the note's asset.
maxImpactBpsintegerThe most price impact to accept, in basis points (100 = 1%). It can only lower the owner's cap (GLOAM_SWAP_MAX_IMPACT_BPS, 200 unless set), never raise it.
networkstringWhich network to swap on: "robinhood-mainnet", "tempo-mainnet", "base-mainnet", "ethereum-mainnet", "elysium-mainnet", "bnb-mainnet", "robinhood", "tempo", "base", "ethereum". The -mainnet ones are th…
notestringA note handle (gloam_list_notes): quote swapping its whole value.

gloam_execute_private_swap Execute a private swap

REAL execution. Swap one note's value from one asset into another, privately: proves locally (the swapped note's unshield to a one-time escrow, the new note, and a refund note) and sends it through the Gloam relay, never from this server's wallet. Who swapped stays private; the tokens and the amounts are public. A swap spends one whole note: with an amount below a note's value, the note is first split with a private send to this server's own notes. Checked first against the owner's spending limits ("swap" must be listed in the agent's tools) and everything gloam_swap_quote checks. Both new not…

ParameterTypeDescription
to *stringWhat you receive: a symbol or a 0x token address.
amountnumberHow much to swap, in the asset's units. Left out with a note handle: its whole value.
fromstringWhat you pay: a symbol or a 0x token address. Left out with a note handle: the note's asset.
maxImpactBpsintegerThe most price impact to accept, in basis points (100 = 1%). It can only lower the owner's cap (GLOAM_SWAP_MAX_IMPACT_BPS, 200 unless set), never raise it.
networkstringWhich network to swap on: "robinhood-mainnet", "tempo-mainnet", "base-mainnet", "ethereum-mainnet", "elysium-mainnet", "bnb-mainnet", "robinhood", "tempo", "base", "ethereum". The -mainnet ones are th…
notestringThe note handle to swap from (gloam_list_notes). Left out: an exact match, else the smallest note that covers the amount.

gloam_finish_swap Finish a private swap

Settle a swap this server made, by its refund note's handle (or its new note's): reads how it ended and does what is needed. When the swapped note's money waits at the swap's escrow, it brings it back as the refund note through the relay; when the refund note can't take it (the vault's fee rose, or the vault is full on routers with an exit), it sends it to a `to` address you give, which is public and goes through the owner's limits like any spend.

ParameterTypeDescription
note *stringThe swap's refund note handle (gloam_list_notes shows it), or its new note's.
tostringOnly for an exit: the 0x address the waiting money goes to. Public.

gloam_solana_info Gloam on Solana

Gloam on Solana (Helius Solana Privacy Rings): the assets, what a private payment hides there (the asset and the amount; the two private accounts and an add's main wallet are visible; proofs are made by Helius's prover), whether Gloam's relay is on, and this agent's private Solana address if GLOAM_AGENT_SOLANA_KEY is set. Read only.

gloam_solana_balance Solana private balance

This agent's private balance on Solana (SOL, USDC, USDT, ZEC), decrypted here from the Rings indexer, plus its private address and whether it is registered (can be paid). Needs GLOAM_AGENT_SOLANA_KEY. Read only.

gloam_solana_register Register the Solana private account

Publish this agent's private Solana account in the Privacy Rings registry, so other Gloam accounts can pay it privately. Gloam's relay pays the record's rent (about 0.0016 SOL); nothing is spent from the agent. Does nothing when it is already registered. Needs GLOAM_AGENT_SOLANA_KEY.

ParameterTypeDescription
timeoutMsintegerHow long to wait for Solana, in ms (default 120000). A send still unsettled then comes back pending with its signature and blockhash.

gloam_solana_add Add money on Solana

Add money to this agent's private Solana balance from its main wallet (the GLOAM_AGENT_SOLANA_KEY wallet), which pays Solana's fee. PUBLIC on chain: the main wallet, the asset and the amount (an add links the main wallet to its private account). Passes the owner's spending limits as tool "shield" on network "solana-mainnet".

ParameterTypeDescription
amount *stringAmount in whole units, like "2.5" (not base units).
asset *stringSOL, USDC, USDT or ZEC (Zcash bridged to Solana by NEAR's Omni Bridge; private once added, the bridge and the add are public).
timeoutMsintegerHow long to wait for Solana, in ms (default 120000). A send still unsettled then comes back pending with its signature and blockhash.

gloam_solana_pay Pay privately on Solana

Pay another Gloam private account on Solana (its registered private address) from this agent's private balance. Gloam's relay pays the fee. HIDDEN: the asset and the amount. VISIBLE: this agent's private account and the recipient's private account (sender and recipient are not hidden on Solana). Proofs are made by Helius's prover. Passes the owner's spending limits as tool "pay" on network "solana-mainnet".

ParameterTypeDescription
amount *stringAmount in whole units, like "2.5" (not base units).
asset *stringSOL, USDC, USDT or ZEC (Zcash bridged to Solana by NEAR's Omni Bridge; private once added, the bridge and the add are public).
to *stringThe recipient's Gloam private address on Solana (base58). It must be registered.
timeoutMsintegerHow long to wait for Solana, in ms (default 120000). A send still unsettled then comes back pending with its signature and blockhash.

gloam_solana_cash_out Cash out on Solana

Cash out from this agent's private Solana balance to any Solana address (default: its own main wallet). Gloam's relay pays the fee. PUBLIC on chain: the private account, the destination, the asset and the amount. Passes the owner's spending limits as tool "pay" on network "solana-mainnet" (the destination must be an allowed recipient unless it is the agent's own main wallet).

ParameterTypeDescription
amount *stringAmount in whole units, like "2.5" (not base units).
asset *stringSOL, USDC, USDT or ZEC (Zcash bridged to Solana by NEAR's Omni Bridge; private once added, the bridge and the add are public).
timeoutMsintegerHow long to wait for Solana, in ms (default 120000). A send still unsettled then comes back pending with its signature and blockhash.
tostringDestination Solana address (base58). Default: this agent's main wallet.

gloam_solana_tx_status Solana transaction status

Where a Solana transaction this server sent stands: landed, failed (nothing moved), dropped (its blockhash expired unseen, nothing moved, safe to send again) or pending. Pass the blockhash a send returned so a dropped one can be told apart. Waits at most timeoutMs (default: one read). Read only.

ParameterTypeDescription
signature *stringThe transaction signature (base58).
blockhashstringThe blockhash the send returned.
timeoutMsintegerKeep checking up to this long, in ms (default 0: read once).

gloam_starknet_info Gloam on Starknet

Gloam on Starknet (Starknet's privacy pool, STRK20; not open on Gloam yet): the asset (USDC), what a payment hides there (over an open channel both sides and the amount; the first payment to someone shows their private account; adds show the account and amount; cash outs show the destination and amount), the pool's auditor key and Starkscan's prover, whether Gloam's relay is on and its fee, and this agent's private Starknet account if GLOAM_AGENT_PRIVATE_KEY is set. Read only.

gloam_starknet_balance Starknet private balance

This agent's private USDC balance on Starknet (its notes, found and read here), what sits at its private account's address ready to add, and whether the account is open (can be paid). Needs GLOAM_AGENT_PRIVATE_KEY. Read only.

gloam_starknet_register Open the Starknet private account

Put this agent's private Starknet account on chain and open it, once: Gloam's relay deploys it (no STRK from the agent) and one proof registers its viewing key, stored encrypted to the pool's auditor key, and opens its own channel. Free, with a daily cap. Shows the account's address. Does nothing when it is already open. Needs GLOAM_AGENT_PRIVATE_KEY.

gloam_starknet_add Add money on Starknet

Make USDC that sits at this agent's private Starknet account's address private (send USDC there first, from any wallet or exchange on Starknet). The account approves the pool and one proof deposits it; Gloam's fee comes out of it. PUBLIC on chain: the account and the amount. Passes the owner's spending limits as tool "shield" on network "starknet-mainnet".

ParameterTypeDescription
amount *stringAmount of USDC in whole units, like "2.5" (not base units).
maxFeestringMost Gloam's relay fee may be, in whole USDC (like "0.25"). Above it nothing is proven or sent. Default: the fee the relay asked when this server last read it.

gloam_starknet_pay Pay privately on Starknet

Pay another Gloam private account on Starknet from this agent's private balance. Gloam's fee comes from the balance too. Over a channel already open it shows neither side nor the amount. The FIRST payment to someone opens a channel to them, which SHOWS their private account (never who paid or how much). Proofs are made by Starkscan's prover. Passes the owner's spending limits as tool "pay" on network "starknet-mainnet" (the amount and the fee count).

ParameterTypeDescription
amount *stringAmount of USDC in whole units, like "2.5" (not base units).
to *stringThe recipient's Gloam private account on Starknet (0x, up to 64 hex digits). It must be open.
maxFeestringMost Gloam's relay fee may be, in whole USDC (like "0.25"). Above it nothing is proven or sent. Default: the fee the relay asked when this server last read it.

gloam_starknet_cash_out Cash out on Starknet

Cash out from this agent's private Starknet balance to any Starknet address (default: its own private account's address, as public USDC). Gloam's fee comes from the balance too. PUBLIC on chain: the destination and the amount, never the private account it came from. Passes the owner's spending limits as tool "pay" on network "starknet-mainnet" (the amount and the fee count; the destination must be an allowed recipient unless it is the agent's own account).

ParameterTypeDescription
amount *stringAmount of USDC in whole units, like "2.5" (not base units).
maxFeestringMost Gloam's relay fee may be, in whole USDC (like "0.25"). Above it nothing is proven or sent. Default: the fee the relay asked when this server last read it.
tostringDestination Starknet address (0x, up to 64 hex digits). Default: this agent's private account's own address.

gloam_starknet_tx_status Starknet transaction status

Where a Starknet transaction stands: accepted (with its block), reverted (nothing moved) or pending. Read through Gloam's Starknet RPC. Read only.

ParameterTypeDescription
txHash *stringThe transaction hash (0x, up to 64 hex digits).

gloam_plan_shield Plan a shield (deposit to private)

Describe moving funds into a private balance (shield), the first step before paying privately. To actually shield, use gloam_execute_shield.

ParameterTypeDescription
usd *numberAmount to shield, in USD.
agentAddressstring
assetstringAsset to shield, e.g. USDG, USDC.e, or ETH on testnet.

gloam_execute_shield Execute a private shield

Deposit into a PRIVATE balance on the chosen Gloam network. Mints a note, generates the Groth16 shield proof server-side with that network's keys, and broadcasts shieldBound() (approving the ERC-20 first when the asset is a token). A mainnet vault takes only the assets it lists (this tool names them if given another), within the deposit limits it reads from the vault; direct deposits are free. The note's secret stays inside this server; the agent gets a note handle to pay from later (gloam_execute_private_pay, gloam_list_notes). Requires GLOAM_AGENT_PRIVATE_KEY; without it, returns a plan.

ParameterTypeDescription
amount *numberAmount to shield into a private balance, in the asset's units (e.g. 25 for 25 USDC.e).
assetstringERC-20 token address to shield; omit to use the network default (USDG on Robinhood Chain mainnet, USDC.e on Tempo mainnet, USDC on Base and Ethereum, PathUSD on Tempo testnet, native ETH on Robinhood…
decimalsintegerDecimals of an asset Gloam does not list; omit it. A listed asset always counts in its own decimals (6 for most stablecoins, 18 for USDT and USDC on BNB Chain, GLOAM and the gas coins), and a value th…
networkstringWhich network to shield on: "robinhood-mainnet", "tempo-mainnet", "base-mainnet", "ethereum-mainnet", "elysium-mainnet", "bnb-mainnet", "robinhood", "tempo", "base", "ethereum". The -mainnet ones are…

gloam_execute_transfer Execute a transfer (public)

Send test ETH publicly on Robinhood Chain TESTNET from the agent wallet, for funding while practicing. This is the PUBLIC rail (amount and recipient are visible) and testnet only. For private movement, use gloam_execute_shield and gloam_execute_private_pay. Requires GLOAM_AGENT_PRIVATE_KEY; without it, returns a plan only.

ParameterTypeDescription
eth *numberAmount of testnet ETH to send.
to *stringRecipient 0x address.

gloam_list_notes Private notes and balance

This server's private notes as handles, with network, asset, amount, status (unspent, pending, spent, dead when its transaction can never land, or held when its last swap reverted and it must move to a fresh note before anything spends it) and the transaction that created each one, plus the spendable private balance per asset. Never shows a secret. Pass refresh to check pending notes against the chain.

ParameterTypeDescription
includeSpentbooleanAlso list spent and dead notes.
networkstringOnly this network.
refreshbooleanCheck pending notes on chain first (read-only calls), and move each held note to a fresh note of this server's (a private send through the relay).

gloam_receive_tag This server's receive tag

The receive tag (gloamr1.…) others pay this server to. Payments sealed to it open only with the key this server keeps. Created on first use. Share it freely: it is a public key, not a secret.

gloam_payment_requirements Price a resource in private payments (x402 and MPP)

SERVER side. Build the HTTP 402 price an agent-paid resource returns, settled privately through Gloam: the amount and the payee never go public, and through the relay neither does the payer's wallet. Returns it in both dialects: x402 requirements (and their encoded form), and an MPP challenge (mpp.wwwAuthenticate, the WWW-Authenticate: Payment value for method gloam, intent charge). payTo defaults to this server's own receive tag. Check what the payer presents with gloam_verify_payment.

ParameterTypeDescription
amount *numberPrice in the asset's display units, e.g. 0.25.
resource *stringWhat is being paid for: a URL or an MCP tool id.
assetstringSettlement token address; omit for the network default (USDG on Robinhood Chain mainnet, USDC.e on Tempo mainnet, USDC on Base and Ethereum, PathUSD on Tempo testnet, ETH on Robinhood Chain testnet).
assetSymbolstringAsset label, e.g. USDC.e; omit for the asset's own symbol.
decimalsintegerDecimals of a settlement asset Gloam does not list; omit it. A listed asset always counts in its own decimals (6 for most stablecoins, 18 for USDT and USDC on BNB Chain), and a value that disagrees is…
expiresInSecondsintegerHow long the MPP challenge stays valid. Leave room to prove and confirm a payment.
networkstringWhich Gloam network the payer settles on: "robinhood-mainnet", "tempo-mainnet", "base-mainnet", "ethereum-mainnet", "elysium-mainnet", "bnb-mainnet", "robinhood", "tempo", "base", "ethereum". The -mai…
payTostringPayee receive tag (gloamr1.…). Omit to be paid to this server's own tag, which gloam_verify_payment can open.
realmstringMPP protection space for the challenge. Default: the resource URL's host.

gloam_pay_x402 Plan a private payment for a 402 challenge

AGENT side. Given a Gloam 402 price (x402 requirements, or an MPP WWW-Authenticate: Payment challenge with method gloam), describe the private payment the agent would make: a self-custodial private send of the required amount to the payee, sealed to the payee's receive tag, broadcast by this server (no operator or facilitator holds its key). Plans only; to pay, call gloam_execute_private_pay, or gloam_fetch_paid to do the whole request.

ParameterTypeDescription
requirements *stringEncoded requirements from gloam_payment_requirements (or the raw JSON), or an MPP challenge (the WWW-Authenticate value).
notestringHandle of the note to pay from (gloam_list_notes), if you want a specific one.

gloam_execute_private_pay Execute a private payment (x402 or MPP)

AGENT side, REAL execution. Settle a 402 price privately from a note this server holds: syncs the pool tree, builds the private send to the payee, seals the payment note to the payee's receive tag, generates the Groth16 transfer proof, and broadcasts transfer(). Self-custodial (this server's key signs; no operator holds funds). Returns the X-PAYMENT header for x402 requirements, or for an MPP challenge (method gloam) the Authorization: Payment credential, and the change as a note handle. A challenge is paid once, and a call whose answer never arrived is not paid twice: the retry reuses the fir…

ParameterTypeDescription
requirements *stringEncoded requirements from gloam_payment_requirements (or raw JSON), or an MPP challenge (the WWW-Authenticate: Payment value).
issuerTagstringOptional issuer tag to attach a compliance disclosure.
notestringHandle of the note to pay from (gloam_list_notes). Omit to use the smallest note that covers the amount.

gloam_fetch_paid Fetch a paid resource (x402 or MPP, paid privately)

AGENT side, REAL execution. Request a URL; if it answers 402 with a Gloam private price, pay it privately from this server's notes (same limits as gloam_execute_private_pay), retry, and return the response. Understands both dialects: an MPP challenge (WWW-Authenticate: Payment with method gloam, answered with Authorization: Payment) is preferred when offered, else x402 (X-PAYMENT). Also pays x402 scheme gloam-cashout (a gateway on Robinhood Chain that pays out to a public address): a cash out of exactly the quoted USDG from this server's notes to that address, sent through the Gloam relay. The…

ParameterTypeDescription
url *stringhttp(s) URL of the resource.
bodystringRequest body for POST.
contentTypestringContent-Type for the body (default application/json).
maxAmountnumberRefuse if the 402 asks for more than this, in the asset's units. Needs the asset's decimals from Gloam's list or the limits file; for any other asset the fetch is refused.
methodstring
notestringHandle of the note to pay from; omit to use the smallest that covers the price.
paymentHeaderstringPresent a payment already made (paymentHeader from an earlier result: an X-PAYMENT value or an MPP Payment credential) instead of paying again.
preferstringWhich x402 scheme to pay when the resource offers both gloam-private and gloam-cashout. Default gloam-private, which keeps the payee private too.

gloam_verify_payment Verify and settle a private payment (x402 or MPP)

SERVER side. Check a presented payment and make it final: an x402 X-PAYMENT value against its requirements, or an MPP credential (the Authorization: Payment value, method gloam) against the challenge it echoes, which must be one this server issued for this price (pass the price as requirements in both cases). Opens the payment note with this server's receive key, checks it binds the required amount and asset in the right pool (and, for MPP, that it is the payment output of a Transferred event and bound to that challenge), then sweeps it into a fresh note only this server knows and waits for th…

ParameterTypeDescription
payment *stringThe X-PAYMENT header value (or raw JSON payload), or the MPP Authorization: Payment value presented by the payer.
requirementsstringThe price of the resource you are serving: x402 requirements (encoded or raw JSON), or the MPP challenge (WWW-Authenticate value). Required for both x402 and MPP: the payment must match this price.

gloam_get_limits Spending limits

This agent's spending limits as the owner set them: which money tools it may use, which assets, the cap per payment and per rolling 24 hours, allowed recipients, and when its permission expires. Check this before planning a payment. This MCP server enforces them before it signs (off-chain). When the agent's key is a Tempo access key, the result also has `onchain`: the owner's AccountKeychain authorization (expiry, the remaining periodic limit and call scopes), which the Tempo protocol enforces on every transaction whatever this server does. The vault contract itself does not know about limits.

gloam_get_spending_report Spending report

What this agent has spent in the last 24 hours and how much is left under its daily limit, per asset, plus its most recent payments and any refused attempts. Read from the local spending log this server keeps.

ParameterTypeDescription
recentintegerHow many recent payments to list.