Skip to main content
Glama
BlockRunAI

BlockRun MCP

Official
by BlockRunAI

blockrun_polymarket

Destructive

Trade on Polymarket prediction markets using real funds. Manage orders, positions, deposits, and withdrawals with full wallet control.

Instructions

Trade on Polymarket prediction markets (CLOB V2, Polygon). REAL MONEY — orders spend pUSD held in your Polymarket deposit wallet, signed locally by your BlockRun key. Free tool (no BlockRun API charge); discover markets/prices/token IDs with blockrun_markets first.

Run action:"setup" FIRST (and again after funding). It creates a gasless deposit wallet owned by your key, checks pUSD balance + exchange approvals, and prints funding instructions. Zero config — no Polymarket account or API keys; setup bootstraps its credentials from your wallet key.

Actions:

  • setup — create/inspect deposit wallet, funding, approvals (confirm:true to sign the approval batch), region check. Idempotent.

  • fund — top up the deposit wallet from your OWN Base USDC, gasless (confirm:true). amount_usd required. BlockRun pays the gas + charges $0.01; you need no ETH. Non-custodial (USDC → Polymarket bridge → your vault).

  • buy / sell — token_id (or condition_id+outcome) + either price+size (limit) or amount_usd (market buy) / size (market sell). confirm:true REQUIRED to place; omitting it returns a dry-run preview. Per-order cap: POLYMARKET_MAX_BET_USD (default $25).

  • orders — list open orders (optional condition_id filter)

  • cancel — order_id:"…" or all:true

  • positions — holdings incl. redeemable winnings (free Data-API)

  • redeem — claim resolved winnings for condition_id (confirm:true; gasless)

  • withdraw — cash out pUSD → native USDC on Base to your agent wallet (confirm:true). amount_usd optional (default: full balance); to_address optional (default: your wallet).

Prices are probabilities 0–1 on the market's tick grid. token_id comes from blockrun_markets Polymarket data. Geoblock is handled by default (CLOB traffic routes through BlockRun's Finland egress) — setup reports your region status. Complying with Polymarket's terms for the user's jurisdiction is the user's responsibility.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNocancel: cancel ALL open orders
sizeNoShares — required for limit orders and market sells
priceNoLimit price as probability (0–1). Omit for a market order.
actionYesOperation to perform
confirmNoMust be true to place orders / sign approvals / redeem. Omit for a dry-run preview.
outcomeNoOutcome label (e.g. 'Yes') — used with condition_id when token_id is omitted
agent_idNoTag for the session betting ledger (bets do NOT draw from the x402 API budget)
order_idNoOrder ID to cancel
token_idNoOutcome token ID (decimal ERC-1155 id from blockrun_markets clobTokenIds)
post_onlyNoMaker-only limit order (rejected if it would cross the book)
amount_usdNopUSD dollars — to spend (market buy) or to cash out (withdraw; default full balance)
expires_atNoUnix seconds expiry (GTD only, ≥ ~3 min in the future)
order_typeNoDefault: GTC for limit orders, FOK for market orders
to_addressNowithdraw: destination address on Base (default: your agent wallet)
condition_idNoMarket condition ID (0x…). With `outcome` it resolves token_id; required for redeem.
max_fill_priceNoMarket orders only: the worst fill you accept (0-1). Defaults to the worst fill of this session's last preview for the same token+side, so a bare confirm:true is already held to what was quoted — a book that moved past it is refused, not signed. Pass this to widen or tighten that bound. Buy = ceiling, sell = floor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.51.1
    • addedInput schema / properties / max_fill_price
      Added value: +{
      +  "description": "Market orders only: the worst fill you accept (0-1). Defaults to the worst fill of this session's last preview for the same token+side, so a bare confirm:true is already held to what was quoted — a book that moved past it is refused, not signed. Pass this to widen or tighten that bound. Buy = ceiling, sell = floor.",
      +  "exclusiveMaximum": 1,
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
  2. Changed1 schema field changedv0.45.1
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  3. Addedv0.31.6

TDQS

A4.9/5.0
Behavior5/5

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

The description openly warns 'REAL MONEY — orders spend pUSD held in your Polymarket deposit wallet, signed locally by your BlockRun key'. It explains the dry-run preview when confirm is omitted, the per-order cap, the geoblock handling, and states 'Complying with Polymarket's terms for the user's jurisdiction is the user's responsibility'. This adds significant context beyond the annotations (readOnlyHint=false, destructiveHint=true).

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?

The description is long but well-structured with action sections and bullet-style lines. It front-loads the critical money warning and the setup requirement. While it could be more condensed, every sentence adds value given the tool's complexity (9 actions, 16 parameters). It is not excessively verbose.

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?

Covers all actions (setup, fund, buy, sell, orders, cancel, positions, redeem, withdraw), pricing, token ID sourcing, confirmations, caps, geoblock, and compliance. It also mentions the free tool aspect and the non-custodial funding path. No critical information is missing for an agent to call it correctly.

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

Parameters5/5

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

The description explains parameter meaning in context: 'Prices are probabilities 0–1 on the market's tick grid', 'token_id comes from blockrun_markets Polymarket data', and the detailed max_fill_price behavior ('Defaults to the worst fill of this session's last preview...'). It also clarifies how condition_id+outcome resolve to token_id, which is not in the schema. This is far beyond the schema's own descriptions.

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 description opens with 'Trade on Polymarket prediction markets (CLOB V2, Polygon)', which is a specific verb-resource pairing. It also references 'discover markets/prices/token IDs with blockrun_markets first', implicitly distinguishing it from the read-only sibling tool blockrun_polymarket_read. The purpose is unmistakable.

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?

Explicitly instructs to run action:'setup' FIRST and after funding, and directs users to blockrun_markets for discovery. It lists each action with its prerequisites and conditions (e.g., 'confirm:true REQUIRED to place', 'amount_usd required' for fund). This gives clear when-to-use and workflow guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.