Skip to main content
Glama
BlockRunAI

BlockRun MCP

Official
by BlockRunAI

blockrun_polymarket

Destructive

Trade on Polymarket prediction markets using your own wallet. Manage deposits, place buy/sell orders, and redeem winnings with gasless transactions.

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.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.45.1
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. Addedv0.31.6

TDQS

A5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses real-money spending, local key signing, gasless wallet creation, fees, non-custodial bridging, dry-run behavior, per-order caps, and geoblock routing. This gives the agent an unusually complete picture of side effects and operational constraints.

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

Conciseness5/5

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

The description is long but earned: the first sentence establishes purpose and risk, followed by a mandatory setup note, a clean bulleted action reference, and closing notes on pricing, region handling, and compliance. There is no filler.

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 15 parameters, real-money transactions, and no output schema, the description covers prerequisites, funding flow, order mechanics, cancellation, redemption, withdrawal, fees, safety gates, and jurisdiction notes. An agent has enough context to call this tool correctly and safely.

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?

Although the schema covers all parameters at 100%, the description adds action-specific meaning: token_id or condition_id+outcome resolution, price+size vs amount_usd semantics, confirm:true as a required side-effect gate, order_type defaults, and withdraw defaults for amount_usd and to_address. This materially exceeds the schema documentation.

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 a concrete verb and resource: 'Trade on Polymarket prediction markets (CLOB V2, Polygon)'. It then lists all nine actions with one-line semantics, making the tool's scope unmistakable and distinguishing it from discovery tools like blockrun_markets.

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 explicit sequencing guidance: 'Run action: "setup" FIRST (and again after funding)' and tells the agent to 'discover markets/prices/token IDs with blockrun_markets first'. It also clarifies when confirm:true is required versus when a dry-run preview is returned, and explains market vs limit order parameter combinations.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BlockRunAI/blockrun-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server