Skip to main content
Glama

prediction.neg_risk_arbitrage

Detect basket arbitrage in Polymarket neg-risk events by comparing the combined YES-basket price to $1, after accounting for fees, slippage, and minimum edge.

Instructions

Detect basket arbitrage in a Polymarket neg-risk (mutually-exclusive,
multi-outcome) event: a full YES basket across all outcomes always settles
to exactly $1 via Polymarket's neg-risk adapter, so a basket price away
from $1 (after costs) is a near risk-free edge. Also computes
buy/sell_basket_capacity_shares - the actual liquidity-bottleneck size the
thinnest outcome's order book can support within max_slippage_pct - so
this isn't just a top-of-book mirage. Polymarket only.

Use this to scan a specific multi-outcome event you already know the slug
for. Do NOT use for binary Yes/No markets (no basket to arbitrage, this
needs 2+ mutually-exclusive outcomes) or for Kalshi (its Data ToS forbids
this use of their data). Pair with prediction.exit_capacity_audit before
sizing a real position on one leg.

Args:
    event_slug: Polymarket event slug, from the event's URL on polymarket.com.
    assumed_round_trip_cost_pct: Gas + fees + slippage buffer, as a
        percentage of $1 basket notional (default 1.5).
    max_slippage_pct: How far past each leg's best price to walk the book
        when sizing executable basket capacity (default 1.0).
    min_net_edge_pct: Minimum net edge (%) required to flag
        arbitrage_viable: true (default 1.0).

Returns:
    On success: {"success": true, "basket_ask_sum", "basket_bid_sum",
        "buy_basket_net_edge_usd", "buy_basket_capacity_shares",
        "opportunity", "arbitrage_viable", ...}
    On failure: {"success": false, "error": {"type", "message"}}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_slugYes
max_slippage_pctNo
min_net_edge_pctNo
assumed_round_trip_cost_pctNo

Schema Changelog

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

  1. Added

TDQS

A4.7/5.0
Behavior4/5

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

The description focuses on detection and computation, which implies a read-only analysis tool, but it does not explicitly state that it has no side effects or that it is non-destructive. Given no annotations are present, a fully explicit side-effect disclosure would have been stronger, but the intent is clear enough.

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 thorough yet not redundant. It includes necessary usage rationale, parameter details, and return summaries. Slightly verbose in parts, but each sentence adds value, so it remains efficient.

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?

Despite lacking an output schema, the description provides a clear summary of the success return keys (basket ask sum, net edge, capacity, viable flag) and the failure format. It also includes domain context (neg-risk mechanics) and situational guidance, making it self-sufficient for an agent.

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?

All four parameters are explained in the description: event_slug is defined, and the three percentage parameters include their defaults and meaning (e.g., round-trip cost, slippage buffer, minimum edge). Since the schema has zero descriptions, this full coverage is crucial and well-executed.

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 clearly states the tool detects basket arbitrage in Polymarket neg-risk events, explains the underlying mechanism (full YES basket settles to $1), and includes explicit guidance on when not to use it. The purpose is unambiguous and specific.

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?

Provides explicit usage instructions: use for a specific multi-outcome event, do not use for binary markets or Kalshi, and suggests pairing with another tool. This leaves no ambiguity about appropriate invocation.

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/parkyucheol-del/alphapipeline'

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