Skip to main content
Glama

calculate_arbitrage

Check if a token trade between two DEXs on a given network yields a profit. Enter input token, output token, and amount to calculate the potential arbitrage spread.

Instructions

Calculate potential arbitrage opportunity between two DEXs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoNetwork name (e.g. 'bsc', 'opbnb', 'ethereum', 'base', etc.) or chain ID. Supports others main popular networks. Defaults to BSC mainnet.bsc
tokenInYesInput token address
amountInYesAmount to check (in wei)
tokenOutYesOutput token address
Behavior2/5

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

With no annotations, the description carries the full burden. 'Calculate' implies a read-only analysis, but it does not disclose what happens during the calculation, whether any transactions are executed, what fees/slippage are considered, or what the output format is. The phrase 'potential arbitrage opportunity' remains vague.

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 a single, well-structured sentence with no wasted words. It is concise and front-loaded, but arguably too brief to be self-sufficient. Still, it is appropriately sized for a simple calculation tool.

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

Completeness2/5

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

The tool has no output schema and no annotations, so the description must explain return values and behavioral context. It does not mention what the output is (e.g., profit, price difference, routes), how the two DEXs are determined, or whether any execution is involved. This leaves significant gaps for an agent to understand the tool fully.

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 100%, so parameters are already documented. The description adds no extra meaning beyond the schema, such as how tokenIn/tokenOut relate to the two DEXs or what 'amountIn' means in this context. Baseline 3 is appropriate since the schema handles the heavy lifting.

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?

The description clearly states the action ('Calculate') and resource ('potential arbitrage opportunity between two DEXs'), which is specific and not a tautology. It is distinct from siblings like get_swap_quote or get_best_route because it mentions 'arbitrage' and 'between two DEXs', though it does not explain how the DEXs are selected.

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

Usage Guidelines2/5

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

No usage guidance is provided. There is no indication of when to use this tool versus other DEX-related tools like get_swap_quote, get_price_impact, or execute_swap, nor any prerequisites or alternative recommendations.

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

Install Server

Other Tools

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/nirholas/universal-crypto-mcp'

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