Skip to main content
Glama

alphapipeline

arb.spread_matrix

Read-only

Use this tool before executing a cross-venue arbitrage trade to check whether a global reference price (Coinbase spot, CoinGecko fallback - not a specific exchange orderbook) and a DEX pool price diverge enough to be worth trading after an assumed flat gas cost. Returns gross/net spread percentages and an is_profitable boolean. Do not use for DEX-only liquidity depth checks or contract security. Paid in USDC on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesTicker symbol, e.g. SUI, BTC, ETH.
networkNoGeckoTerminal network id, e.g. base, eth. Defaults to base.
pool_addressNoSpecific DEX pool contract address (optional if token_address is given).
token_addressNoToken contract address - the most liquid pool is auto-selected (optional if pool_address is given).
trade_size_usdNoHypothetical trade size in USD. Defaults to 1000.
min_spread_threshold_pctNoNet spread threshold (%) above which is_profitable is true. Defaults to 0.8.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noticeNo
symbolYes
networkYes
directionNo
data_sourceYes
generated_atYes
pool_addressNo
cex_price_usdNo
dex_price_usdNo
is_profitableYes
net_spread_pctNo
status_messageYes
trade_size_usdYes
gross_spread_pctNo
assumed_gas_cost_usdYes
min_spread_threshold_pctYes

Schema Changelog

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

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark read-only/non-destructive, and the description adds substantial behavioral context: the reference price source and fallback, the flat-gas-cost assumption, the returned metrics, and the USDC payment. No contradiction with annotations.

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?

Three sentences are tightly packed: use case, output, exclusions, and cost. Front-loaded with the most important instruction; 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?

For a read-only analysis tool with full schema coverage and an output schema, the description provides all necessary selection and invocation context, including payment and scope. It even disambiguates against sibling tools.

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?

Input schema covers all 6 params with descriptions (100% coverage), so baseline 3 applies. The description adds context about the analysis (gross/net spreads, assumed gas) but does not add parameter-level detail beyond the schema.

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?

States a specific use case (pre-trade arbitrage check), defines the exact comparison (global reference price vs DEX pool price), and explicitly excludes unrelated uses (liquidity depth, contract security), which differentiates it from sibling tools.

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 says when to use ('before executing a cross-venue arbitrage trade') and when not to use ('Do not use for DEX-only liquidity depth checks or contract security'), pointing to alternative categories among siblings. It also mentions the cost and network context.

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.