Skip to main content
Glama

evm_calculate_arbitrage

Calculates arbitrage opportunities across DEX pools by comparing token prices, factoring gas, slippage, and flash loan fees, and identifying profitable routes with execution details.

Instructions

Calculate arbitrage opportunities across DEX pools.

Compares token prices across multiple DEXs to identify profitable arbitrage trades. Factors in gas costs, slippage, and flash loan fees.

PARAMETERS:

  • chain: Target EVM chain

  • tokenIn: Input token address

  • tokenOut: Output token address

  • amountIn: Amount to arbitrage in token units

  • dexes: DEX names to compare (e.g., ["uniswap", "sushiswap"])

ANALYSIS: • Compares prices across multiple DEXs • Calculates net profit after gas and fees • Identifies best arbitrage route • Estimates execution risk

Returns profit opportunity, optimal route, and execution instructions.

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": {
      "chain": "<chain>",
      "tokenIn": "<tokenIn>",
      "tokenOut": "<tokenOut>",
      "amountIn": "<amountIn>"
    },
    "name": "evm_calculate_arbitrage"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYes
dexesNoDEXs to compare
tokenInYesInput token address
amountInYesAmount to arbitrage
tokenOutYesOutput token address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose relevant behavior beyond the schema — gas costs, slippage, and flash loan fees are factored in, and outputs are profit opportunity, optimal route, and execution instructions — but it never resolves the critical safety question of whether the tool is read-only or actually submits trades, and says nothing about data freshness or rate limits.

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?

Content is front-loaded and scannable, but the same fact ('compares prices across multiple DEXs') appears three times across the intro, the analysis list, and the parameters list. Roughly a third of the text is redundant restatement rather than added information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Since there is no output schema, the description must characterize returns, and it does at a high level (profit opportunity, optimal route, execution instructions). However, for a 5-parameter financial-analysis tool it omits whether a trade is executed, how amountIn units/decimals and token address formats are interpreted, and any chain-specific limits, leaving real gaps.

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?

Schema description coverage is 80%, so the baseline is 3. The description restates each parameter with roughly the same gloss as the schema, adding only a concrete DEX-name example ('["uniswap", "sushiswap"]') and 'token units' for amountIn, which does not clarify decimals or address format.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Calculate arbitrage opportunities across DEX pools') and implies an analysis-only role, which separates it from execution siblings like evm_execute_swap or evm_execute_flash_loan and from evm_find_bridge_routes. No sibling is named explicitly, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the description says it 'Returns profit opportunity, optimal route, and execution instructions', suggesting an analytical pre-trade step, but it never states when to use this versus evm_estimate_fees or evm_execute_swap, nor whether it must be called before execution. No exclusions or alternatives are given.

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

Deploy Server

Other Tools