Skip to main content
Glama

Execution-Quality Verifier

exec_verify
Read-onlyIdempotent

Deterministic execution-quality / fair-fill verification. Given a completed swap (amountIn, amountOutRealized) plus either the pre-trade pool reserves+fee (constant-product) or a fair reference price, returns how many basis points the fill lost to ADVERSE execution (sandwich/MEV/stale) beyond the unavoidable fee + own price impact. Proves that a fill "within slippage tolerance" can still have been robbed. Call after a swap to detect being sandwiched.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feeTierNopool fee as fraction, e.g. 0.003
amountInYesinput amount actually sent
fairPriceNoreference mode: fair out-per-in price at submit time
reserveInNopool reserve of input token, pre-trade (constant-product mode)
reserveOutNopool reserve of output token, pre-trade
amountOutRealizedYesoutput amount actually received
slippageTolerancePctNothe slippage setting used, to demonstrate within-tolerance-yet-robbed

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNofalse when the engine rejected the input
modeNoconstant-product or reference-price mode
noteNointerpretation guidance
proofNoVerifiability envelope: echoed inputs, engine codeHash, contentHash of this exact result, self-checks, EIP-712 signature (EAS-ready). Re-run the open engine on `inputs` to reproduce the result byte-for-byte.
checksNoGround-truth self-checks; the result is untrustworthy if any fails.
verdictNoplain-language verdict
midPriceNopre-trade mid price
honestOutNooutput an honest execution would have delivered
adverseValueOutNovalue lost to adverse execution, in output-token units
honestFillPriceNothe fill price an honest execution would have produced
realizedFillPriceNothe fill price actually received
unavoidableCostBpsNofee + own price impact — the honest, unavoidable cost (bps)
adverseExecutionBpsNobps lost to ADVERSE execution beyond the honest cost

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description adds that the tool is deterministic, describes what it computes (basis points lost to adverse execution), and emphasizes it proves 'within slippage tolerance can still have been robbed'. This provides useful behavioral context beyond the 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?

The description is concise, front-loaded with the core purpose, and each sentence adds value. It avoids redundancy and stays within a few sentences.

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?

Given the tool's complexity (7 parameters, 2 required, output schema exists), the description covers what the tool does, when to call it, the two input modes, and the output interpretation. It is complete enough for an agent to understand and invoke correctly.

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 coverage is 100%, so baseline is 3. The description groups parameters into input modes (amountIn, amountOutRealized plus either reserves+fee or fairPrice) but does not add new semantics beyond the schema's descriptions. It does not compensate for any gaps.

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?

The description clearly states it is a 'Deterministic execution-quality / fair-fill verification' tool that detects adverse execution (sandwich/MEV/stale) beyond unavoidable fee and price impact. It uses specific verbs and resources, and its purpose is distinct from sibling tools like risk gates or volume analytics.

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

Usage Guidelines4/5

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

The description says 'Call after a swap to detect being sandwiched' and explains the two input modes (pre-trade reserves+fee or fair reference price). It also warns that within-slippage fills can still be robbed. It could be stronger by explicitly stating when not to use it or listing alternatives, but the guidance is clear.

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.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool addresses a distinct risk domain (event volatility, execution verification, LP risk, options, perps, portfolio, attestation, sizing, treasury) with no overlap; descriptions are precise and differentiate clearly.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern combining a domain prefix with a verb or metaphor (e.g., _risk, _gate, _verify), making them predictable and easy to parse.

Tool Count5/5

The 9 tools cover a broad range of DeFi risk computations without being excessive; each tool serves a clear, non-redundant purpose within the server's scope.

Completeness5/5

The tool set provides comprehensive coverage for a risk analysis server: event risk, execution quality, LP risk, options and perps greeks, portfolio stress, attestation, sizing, and treasury risk; no obvious gaps for the intended domain.

Resources