Skip to main content
Glama
omnioperand-mcp

omnioperand-mcp

omni_slippage_tolerance_price_impact

Calculates DEX swap price impact, minimum received tokens, slippage buffer, and MEV sandwich risk from trade size, pool liquidity, and slippage tolerance.

Instructions

DEX Slippage Tolerance & Price Impact Calculator. Calculate price impact percentage, minimum received tokens, and sandwich MEV vulnerability on Uniswap constant product liquidity pools. Discipline: CRYPTO. Governing mathematical model / formula: Price Impact (%) ≈ Trade Size / (2 · Pool Reserves) | Min Received = Quoted Amount · (1 - Slippage % / 100).

USAGE GUIDELINES:

  • WHEN TO USE: Invoke for deterministic calculation of calculated_price_impact (Algorithmic Price Impact), minimum_received_usd (Minimum Guaranteed Proceeds), mev_sandwich_risk (MEV Bot Sandwich Vulnerability), slippage_buffer_dollars (Slippage Loss Buffer) using trade_swap_amount_usd (Swap Trade Size ($ USD)), pool_liquidity_reserve_usd (Pool Total Liquidity ($ USD)), slippage_tolerance_pct (Configured Slippage Tolerance (%) in %). Guarantees exact machine floating-point precision, eliminating LLM arithmetic mistakes and formula hallucinations.

  • WHEN NOT TO USE: Do not use for qualitative evaluations or unquantified reasoning. All input parameters must be valid numerical values.

DISAMBIGUATION & BOUNDARIES:

  • Use this dedicated specialist tool for 'DEX Slippage Tolerance & Price Impact Calculator' rather than generic dispatchers like omni_universal_query.

  • For multi-calculation chained jobs, use 'omni_batch_calculate'.

  • To inspect schema fields, see 'omni_describe_solver'.

BEHAVIOR & SAFETY:

  • Pure deterministic computation with machine floating-point precision.

  • Read-only, idempotent, and stateless. Zero side effects or persistent state mutations.

  • Input validation: All arguments are validated against physical and domain bounds. Out-of-bounds inputs return a safe diagnostic error status without throwing runtime exceptions.

RETURNS:

  • Structured JSON object containing:

    • status (string): "success" on valid execution or "error" if validation fails

    • calculator (string): "slippage-tolerance-price-impact"

    • category (string): "crypto"

    • name (string): "DEX Slippage Tolerance & Price Impact Calculator"

    • formula (string): Governing mathematical formula string

    • inputs (object): Echoed input parameter dictionary with applied defaults

    • metrics (object): Dictionary of computed outputs:

      • metrics.calculated_price_impact (Algorithmic Price Impact): Formatted display string (e.g. '4.88%')

      • metrics.minimum_received_usd (Minimum Guaranteed Proceeds): Formatted display string (e.g. '$23,780.00')

      • metrics.mev_sandwich_risk (MEV Bot Sandwich Vulnerability): Formatted display string (e.g. 'Elevated Risk (Use Private RPC)')

      • metrics.slippage_buffer_dollars (Slippage Loss Buffer): Formatted display string (e.g. '$125.00 Maximum')

    • execution_time_ms (number): Latency in milliseconds.

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": "omni_slippage_tolerance_price_impact"
  }
}

Input Schema

NameRequiredDescriptionDefault
trade_swap_amount_usdNoSwap Trade Size ($ USD). Size of market swap. Default: 25000. Min: 50. Max: 10000000.
slippage_tolerance_pctNoConfigured Slippage Tolerance (%) (%). Max allowable price deviation before transaction reverts. Default: 0.5. Min: 0.1. Max: 5.
pool_liquidity_reserve_usdNoPool Total Liquidity ($ USD). Total reserve depth in the trading pool. Default: 500000. Min: 5000. Max: 50000000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it declares the tool read-only, idempotent, stateless, zero side effects, deterministic with floating-point precision, and specifies that out-of-bounds inputs return a safe diagnostic error rather than throwing. That is behavior beyond anything structured metadata provides.

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 purpose and formula, then clearly sectioned (usage, disambiguation, behavior, returns). Minor waste: the 'machine floating-point precision' guarantee is stated twice, and the governing formula reappears in the RETURNS block.

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?

Although no output schema exists, the RETURNS section enumerates every response field including status, calculator, formula, echoed inputs, and each computed metric with example formatted values. Combined with validation and error-status disclosure, nothing an agent needs to call or interpret this tool is missing.

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 description coverage is 100%, so the schema already documents all three parameters with defaults and bounds; baseline would be 3. The description adds value by tying each parameter to the output metrics and stating the formula that relates trade size, pool reserves, and slippage tolerance, which explains why these inputs matter rather than just restating their names.

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 named calculator ('DEX Slippage Tolerance & Price Impact Calculator') plus the exact outputs it computes (price impact %, minimum received, sandwich MEV risk) and the governing formula. It is immediately distinguishable from generic dispatchers and from siblings like omni_futures_liquidation_price.

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?

Explicit WHEN TO USE with the exact metric names and input parameters, an explicit WHEN NOT TO USE ('qualitative evaluations or unquantified reasoning'), and a disambiguation section routing chained jobs to omni_batch_calculate, schema inspection to omni_describe_solver, and generic queries away from omni_universal_query.

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