Skip to main content
Glama

Get your side-market positions

get_positions
Read-onlyIdempotent

Use this when you want to see your side bets and how they stand. With slug, one market's for one wallet (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): wallets (your account's own; a wallet not among them yet still bets, and its first landed bet adds it to your account when your key may edit the profile), ticket_wallets (the wallets not on your account from which your account holds a ticket on that market, a ticket naming the account that last submitted from its wallet: read one with wallet), wallet, trading_now (you may buy there now), sells_now and sells_until (you may sell or close now, also between windows, until the result is public), bar (why you may not buy there now, with its fix: house, staff, no_wallet, ticket_revoked, or scope: your key lacks the bet scope; null when you may; scope stops a sell too, since a key without the bet scope can neither buy nor sell, while the others stop buys only), ticket (your wallet's ticket on the market: revoked stops buys only; settled, what the settlement paid and its transaction), positions (each outcome you hold: label, its entrant's '@handle' (on a market whose house is listed, a house entry's is 'make.fun bot', its entry.house true and entry.entrant null), and entry, whose entry.name is the entry's own name, since a bet is on what the market's follows says, that one entry or its entrant (get_market's follows; without slug, each market's own); side yes or no, shares_base_units, cost_base_units and avg_price_ppm, price_ppm now, value_base_units and value_kind: cash_out, a sell of every share quoted against the book, fee included, whenever a sell lands now, or after resolution what it settles for; mark, the side's price now times the shares while no sell lands (halted, proposed, or past sells_until), an estimate; pnl_base_units and pnl_pct, value less cost; realized_base_units from your sells; to_win_base_units; status open, scratched, won, lost or void; replaced, true where its entrant has replaced that entry since, as get_market's outcomes say it: it can win only if it is its entrant's entry again at the deadline, and never on a market that follows the entrant), totals, trades (your wallet's there, newest first), balances (its USDC and SOL), funding (get_funding words it for your person). Without slug, every market any wallet of yours holds a ticket on, and every ticket naming your account from a wallet not on it (GET /api/me/markets): wallets, markets (each its competition, status, trading_now, sells_now, sells_until, wallet, ticket, positions and totals, open markets first) and totals. Settlement is automatic: once a market is final or void, make.fun settles each ticket to its wallet. Next: to cut or close a position, prepare_bet (action sell with shares, or close: true) while sells_now holds; to hold it, do nothing. At resolution the winning outcome's YES shares and every other outcome's NO shares pay 1 USDC each, and the rest pay nothing: NONE wins when no entry is placed first, and FIELD when the winner is an entry the market never listed (on a market that follows the entrant, an entry of an entrant with no live outcome there), so then every listed outcome's YES pays nothing and its NO pays 1 USDC. On a market whose house is listed, NONE wins only when nobody finishes first (no entry holds place 1 and no house entry qualifies), and FIELD when the one that finishes first, an entrant's entry or a house entry, has no live outcome. A scratched entry's positions (on a market that follows the entrant, a scratched entrant's) are paid as an outcome that cannot win: its YES shares pay nothing and its NO shares pay 1 USDC each, when the market settles. A voided market pays every other position at its frozen price. Once the market is final or void, make.fun settles every ticket on chain, which pays the USDC to the wallet that traded: there is nothing to claim. So the money reaches the wallet that traded: a sale's USDC at once, in the sale's own transaction, and a position's payout automatically once the market is final or void; for a connected agent that is its own agent wallet, the same way, and the USDC there is its person's. It stays in that wallet (its balances on GET .../market/me) until the wallet's keypair sends it on, as an ordinary Solana USDC transfer that pays its own network fee in SOL (make.fun pays a trade's fees, never a transfer's): a person moves what is in their own wallet themselves, and USDC in an agent wallet moves only when its person asks the agent to send it to a wallet they name, and nowhere else. 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

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_positions"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugNoOne competition: its market alone, with your balances and funding (default: every market you hold a ticket on)
walletNoWith slug: which wallet, any 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)

Output Schema

NameRequiredDescriptionDefault
barNo
faucetNo
statusNo
ticketNo
totalsYes
tradesNo
walletNo
fundingNo
marketsNoWithout slug: every market a wallet of yours holds a ticket on, and every ticket naming your account from a wallet not on it, open markets first
walletsYes
balancesNo
positionsNo
sells_nowNo
competitionNo
sells_untilNo
trading_nowNo
ticket_walletsNoWith slug: the wallets not on your account from which your account holds a ticket on that market (a ticket names the account that last submitted from its wallet)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / markets / description
      Previous value: -"Without slug: every market a wallet of yours holds a ticket on, open markets first"New value: +"Without slug: every market a wallet of yours holds a ticket on, and every ticket naming your account from a wallet not on it, open markets first"
    • addedOutput schema / properties / ticket_wallets
      Added value: +{
      +  "description": "With slug: the wallets not on your account from which your account holds a ticket on that market (a ticket names the account that last submitted from its wallet)",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / wallet / description
      Previous value: -"With slug: 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: +"With slug: which wallet, any 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)"
  3. Changed4 schema fields changed
    • addedOutput schema / properties / markets / items / properties / positions / items / properties / replaced
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / markets / items / properties / positions / items / properties / replaced_by_outcome_id
      Added value: +{
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / positions / items / properties / replaced
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / positions / items / properties / replaced_by_outcome_id
      Added value: +{
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
  4. Added

TDQS

A4/5.0
Behavior5/5

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

Beyond the read-only and idempotent annotations, the description discloses the signed-in requirement, the 401 failure mode, automatic settlement with nothing to claim, and wallet payout behavior. It also explains how the default wallet is selected across agent-connect, sign-in, and first-wallet cases.

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 purpose is front-loaded, but the remainder is a single enormous run-on paragraph with dense nested clauses. Large sections detail settlement mechanics, field meanings, and fund movement that are not necessary for invoking a read tool, making the definition far from appropriately sized.

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 existing output schema, the description does not need to explain return values, yet it still covers authentication, scope, default wallet behavior, settlement outcomes, and next actions. Nothing needed to call the tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and both slug and wallet are already well documented in the schema. The description repeats the slug scope and wallet default logic without adding material meaning beyond the schema, so the baseline of 3 is appropriate.

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 opening sentence, "Use this when you want to see your side bets and how they stand," gives a specific verb and resource, and the slug/no-slug scoping is explicit. It distinguishes the tool from prepare_bet by pointing there for sells, but the core purpose is buried under extensive field-level exposition.

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?

The description states when to use it (viewing positions) and gives a clear next step: use prepare_bet with action sell or close while sells_now holds, and do nothing to hold. It does not explicitly exclude or compare against adjacent read tools such as get_market or get_claim, so the guidance is strong but incomplete.

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.