Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Cross Venue Arbitrage

workflow.run_cross_venue_arbitrage
Read-only

Checks 2-5 quotes for the SAME real-world binary bet across venues (or manually-supplied probabilities) for a direction-independent price gap at the quoted prices: "Yes" at whichever venue quotes it cheapest, "No" at whichever venue quotes "Yes" most expensively (its own "No" price is assumed to be 1 minus its own "Yes" price, the standard complementary-binary convention). Reports isArbitrage, the cost to lock in $1 of guaranteed payout, the locked-in profit and ROI at the quoted prices for a given stake, and which venue quotes each side. feeFractionPerLeg (older name feePctPerLeg, same fraction) is an optional per-leg trading-fee rate that can and does erase a real-looking spread - reported honestly via isArbitrage rather than always showing a positive number. Edge cases: 2 to 5 quotes or 2 to 5 manualProbabilitiesPct (each 0.01 to 99.99); stakeUsd above zero; feeFractionPerLeg 0 to 0.2 as a fraction, 0.01 is 1% (default 0). The No price of a venue is taken as 1 minus its Yes price. A gap that fees erase is reported as isArbitrage false. Not covered: the identifiers being the same bet and resolving the same way (you confirm that), order book depth and slippage, withdrawal and deposit costs, settlement-rule differences, and capital lock-up until resolution. Use when user asks "can I arbitrage this bet across venues?" or "does the quoted price gap survive fees?". The caller asserts the venues quote the same bet; this tool does not verify that. If available is false, do not use any result field (computed figures and any verdict are null or empty), so read available first.

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": {
      "stakeUsd": "<stakeUsd>"
    },
    "name": "workflow.run_cross_venue_arbitrage"
  }
}

Input Schema

NameRequiredDescriptionDefault
quotesNoLive mode: one entry per venue, 2-5 total. Provide this OR manualProbabilitiesPct, not both.
stakeUsdYesTotal capital to deploy across both legs
feePctPerLegNoOlder name of feeFractionPerLeg, kept so existing callers keep working; the value is the same FRACTION, not a percent (0.01 is 1%). Prefer feeFractionPerLeg.
feeFractionPerLegNoOptional per-leg trading fee as a FRACTION of the price: 0.01 means 1%, 0.001 means 0.1%, 0.02 means 2%; maximum 0.2 (20%). Default 0. Use this field for any fee.
manualProbabilitiesPctNoManual mode: 2-5 probabilities (0.01-99.99) already known for the same bet across different venues, when you don't want a live fetch. Provide this OR quotes, not both.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / feeFractionPerLeg
      Added value: +{
      +  "description": "Optional per-leg trading fee as a FRACTION of the price: 0.01 means 1%, 0.001 means 0.1%, 0.02 means 2%; maximum 0.2 (20%). Default 0. Use this field for any fee.",
      +  "maximum": 0.2,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / feePctPerLeg / description
      Previous value: -"Optional per-leg trading-fee rate, e.g. 0.02 for 2% (default 0)"New value: +"Older name of feeFractionPerLeg, kept so existing callers keep working; the value is the same FRACTION, not a percent (0.01 is 1%). Prefer feeFractionPerLeg."
    • addedInput schema / properties / feePctPerLeg / maximum
      Added value: +0.2
    • addedInput schema / properties / feePctPerLeg / minimum
      Added value: +0
  2. Changed1 schema field changed
    • addedInput schema / properties / quotes / items / properties / venue / description
      Added value: +"Prediction-market venue this quote comes from"
  3. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds non-obvious behavior: fees can erase a real-looking spread and the tool reports that honestly as isArbitrage false rather than always showing a positive number, and the No leg is derived as 1 minus the venue's Yes price. It also discloses the critical failure contract — if available is false, all computed fields and the verdict are null or empty, so available must be read first. The only shortfall is that it does not say what drives available=false (fetch failure vs. unknown venue vs. unmatched identifiers).

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

Conciseness3/5

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

The core check is front-loaded in the first sentence, but the prose is dense and repetition creeps in: the fee-erases-spread point is made twice ('can and does erase a real-looking spread' and later 'A gap that fees erase is reported as isArbitrage false'), and the No = 1 - Yes convention appears twice. Every clause is substantive, but the parenthetical-heavy style makes it slower to parse than it needs to be.

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?

With no output schema, the description carries the return-value burden itself, and it does: it names isArbitrage, the cost to lock in $1 of payout, locked-in profit, ROI, and the per-side venue attribution. Edge cases (2-5 quotes or probabilities, probability bounds 0.01-99.99, stake above zero, fee bounds) and the available-flag failure path are all covered, which is sufficient for a two-mode calculator of this complexity.

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 baseline is 3, and the description earns above that by explaining that feeFractionPerLeg is a fraction (0.01 = 1%, default 0, max 0.2) and that feePctPerLeg is a legacy alias of the same fraction — a real trap it pre-empts. It also clarifies the economics of the fee parameter (it can erase a spread), which the schema does not convey. It adds little on stakeUsd or the quotes/manualProbabilitiesPct mutual exclusivity beyond what the schema already says.

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 uses a specific verb and resource ('Checks 2-5 quotes for the SAME real-world binary bet across venues') and immediately scopes what the check computes: a direction-independent price gap plus isArbitrage, cost to lock in $1, profit and ROI. It is clearly not a generic pricing or funding-arbitrage tool, since it explicitly states both legs are binary Yes/No quotes at different venues and that the caller asserts they are the same bet.

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 trigger phrasing ('Use when user asks "can I arbitrage this bet across venues?" or "does the quoted price gap survive fees?"') plus a concrete when-not list of what it does not cover (same-bet verification, order book depth, withdrawal costs, settlement rules, capital lock-up). It also states the mode choice between live quotes and manualProbabilitiesPct and the prerequisite that the caller confirm the identifiers are the same bet.

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.