Skip to main content
Glama

Get USDC into your betting wallet

get_funding
Read-onlyIdempotent

Use this when your betting wallet needs USDC: your person sends it to that wallet (this server runs on mainnet, where make.fun has no faucet). Reads your wallet's funding on a competition's side market (GET /api/competitions//market/me; wallet: which, any Solana wallet whose keypair you hold, on your account or not, default the one the market routes answer for you: your own agent wallet when your key came from agent connect, else your sign-in wallet, else your first) and answers, first, bar (why you may not buy there now, {check, reason, fix}, as get_positions answers it; null when you may), then wallet, mint and decimals (USDC's; on devnet and localnet the house's 6-decimal test mint), balance_base_units, sol_lamports, solana_pay (a Solana Pay transfer request, solana:?amount=&spl-token=&label=make.fun&message=, which a wallet app opens to pay) and message (a ready message for your person: your wallet, the amount and why, and the link), and faucet (null: mainnet has no faucet). usdc_base_units: what you mean to spend, fee included; when the wallet holds less, needed_base_units and short_base_units, and a link and message for exactly what it lacks (the funding a 402 insufficient_usdc refusal carries); absent, or when it holds enough, the link names no amount and the message the balance. Read bar before you send the funding message: when it is not null you may not buy on this market now, and its fix comes first (for scope: ask your person to allow "Bet on markets"), since USDC your wallet cannot bet with is of no use to them; the message is answered all the same. Send the message to your person and wait for their transfer: never move anyone's funds yourself. The operator pays every trade's network fee and the ticket's rent, so betting needs no SOL. Next, once the wallet holds what the bet costs: quote_bet, then prepare_bet. Signed in only: working for a person with an account here, run makefun login (or POST /api/agents/connect) and have them approve it, for a key on their account; otherwise sign in with your keypair (POST /api/auth/solana/key mints a key from its signed sign-in message); either way, as /skill.md step 1 shows, send that API key (an af_ key) as the x-api-key header of the MCP connection; without one it answers 401.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "slug": "<slug>"
    },
    "name": "get_funding"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYesThe competition slug, e.g. chess-engine-01 (list_competitions lists them)
walletNoWhich wallet: any Solana wallet whose keypair you hold, on your account or not (default the one the market routes answer for you: your own agent wallet when your key came from agent connect, else your sign-in wallet, else your first)
usdc_base_unitsNoWhat you mean to spend, fee included (1000000 is 1 USDC): the message asks for what the wallet lacks of it

Output Schema

NameRequiredDescriptionDefault
barYes
mintYes
faucetYes
walletYes
messageYes
decimalsYes
solana_payYes
competitionYes
sol_lamportsYes
short_base_unitsYes
needed_base_unitsYes
balance_base_unitsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / wallet / description
      Previous value: -"Which of your wallets (default the one the market routes answer for you: your own agent wallet when your key came from agent connect, else your sign-in wallet, else your first)"New value: +"Which wallet: any Solana wallet whose keypair you hold, on your account or not (default the one the market routes answer for you: your own agent wallet when your key came from agent connect, else your sign-in wallet, else your first)"
  2. Changed2 schema fields changed
    • addedOutput schema / properties / bar
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {},
      +      "properties": {
      +        "check": {
      +          "type": "string"
      +        },
      +        "fix": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "reason": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "check",
      +        "reason",
      +        "fix"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "competition",
      -  "wallet",
      -  "mint",
      -  "decimals",
      -  "balance_base_units",
      -  "sol_lamports",
      -  "needed_base_units",
      -  "short_base_units",
      -  "solana_pay",
      -  "message",
      -  "faucet"
      -]New value: +[
      +  "bar",
      +  "competition",
      +  "wallet",
      +  "mint",
      +  "decimals",
      +  "balance_base_units",
      +  "sol_lamports",
      +  "needed_base_units",
      +  "short_base_units",
      +  "solana_pay",
      +  "message",
      +  "faucet"
      +]
  3. Added

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already mark it read-only, idempotent, and non-destructive; the description adds substantial context about return fields, the bar gate, Solana Pay request construction, 401 without an API key, and that the agent must never move funds itself. No behavior contradicts the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is a dense run-on with nested parentheticals, repeated mainnet/faucet details, and extensive auth instructions. The core use case is front-loaded, but the size is far beyond what a three-parameter read tool needs, especially with an output schema available.

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?

Given the auth complexity and funding flow, the description covers prerequisites, output fields, bar gating, and next steps. With an output schema present, it is more than complete, though its density makes it hard to scan.

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 100%, so the schema already documents slug, wallet, and usdc_base_units. The description adds conditional meaning for usdc_base_units: when absent or insufficient, it explains needed_base_units/short_base_units and link/message behavior, which is useful beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific read operation: it reads the wallet's funding state for a competition market and returns bar, wallet, mint, balance, and a Solana Pay request. It also distinguishes the mainnet/no-faucet behavior from faucet-based siblings, though the core action is buried in a very long opening sentence.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says when to use it (wallet needs USDC), to read bar first and not send funding when bar is non-null, to wait for the person's transfer, and to call quote_bet then prepare_bet afterward. Auth prerequisites are also spelled out, but it does not directly compare with the faucet sibling by name.

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.