Skip to main content
Glama

Net-profit cross-chain arb & tranche execution planner

defi_cross_arb_plan
Read-onlyIdempotent

Sizes cross-chain DEX arbitrage after gas, bridge, and slippage costs, verifies dual-chain RPCs, and returns a tranche plan only when the spread remains profitable.

Instructions

[$0.04] Trigger When: sizing cross-chain DEX arbitrage after all fees. Workflow Outcome: verifies dual-chain RPCs, deducts gas, bridge, and slippage costs, and outputs a tranche plan. Do not use for DeFi yield pool ranking (use defi_yield_pools) or single-token snapshots (use token_market_snapshot). source_chain and destination_chain must differ, and profitable_after_costs turns false whenever gas+bridge+slippage exceed spread. Live DEX/RPC, read-only non-custodial plan; requires x402 USDC or Stripe MPP (10 free lifetime calls via /api/free/*) at 30-60 req/min.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "defi_cross_arb_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetNoToken symbol to arbitrageUSDC
amount_usdNoTrade notional in USD (50-5000000)
source_chainNoSource EVM chain (base, ethereum, arbitrum, optimism)base
session_tokenNoOptional prepaid session token (x402s_...) from https://apix402data.com/pay after the 10-call free preview.
max_slippage_bpsNoMaximum slippage tolerance in basis points (5-500)
destination_chainNoDestination EVM chain (must differ from source_chain)arbitrum

Output Schema

NameRequiredDescriptionDefault
assetNo
cachedNo
venuesNo
degradedNo
endpointNo
economicsNo
rpc_healthNo
spread_bpsNo
source_chainNo
non_custodialNo
execution_planNo
schema_versionNo
destination_chainNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, non-destructive, and open-world. The description goes well beyond them: it discloses the dual-chain RPC verification step, the cost deductions (gas, bridge, slippage), the profitable_after_costs flag turning false when costs exceed spread, and the payment/rate-limit regime (x402 USDC or Stripe MPP, 10 free lifetime calls, 30-60 req/min).

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?

Front-loaded with the trigger condition and outcome, and the 'Do not use' clause sits before the constraint details. The final sentence packs pricing, auth, free tier, and rate limits into one long run-on, which costs a little readability.

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?

An output schema exists, so return values need not be re-explained. For a paid, open-world, read-only planning tool the description covers cost, auth path, free tier, rate limits, and the chain constraint — everything an agent needs before invoking.

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. The description adds a cross-parameter constraint (source_chain and destination_chain must differ) and ties the cost model to the profitable_after_costs output, though the 'must differ' rule is partially restated from the destination_chain schema text.

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 verb and resource — sizing cross-chain DEX arbitrage after all fees — and names the concrete deliverable (a tranche plan). It explicitly distinguishes itself from defi_yield_pools and token_market_snapshot, so an agent can route correctly without opening a schema.

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 an explicit trigger condition ('Trigger When: sizing cross-chain DEX arbitrage after all fees') plus two named exclusions with the sibling to use instead. This is the when/when-not/alternative pattern in full.

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