Skip to main content
Glama

insight-oracle

pre_trade_safety_check

Pre-trade oracle safety checkpoint for AI agents. Call this BEFORE executing any on-chain swap/borrow/lend/liquidation/repay to assess oracle risk. Aggregates cross-oracle consensus prices, per-provider deviation, data freshness, stablecoin peg status, and reputation into a single verdict: PASS / CAUTION / DANGER / BLOCK. AI agents MUST NOT execute trades when the verdict is DANGER or BLOCK. Also returns a recommended maximum position size. A PASS is not principal authorization or a guarantee of price correctness or economic safety.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetYesAsset symbol being traded, e.g. BTC, ETH, USDC
actionYes
chainIdYesChain ID where the trade executes, e.g. 1=Ethereum, 42161=Arbitrum, 8453=Base. Use 0 for chain-agnostic.
tradeAmountUsdYesTrade size in USD
targetProvidersNoOptional: restrict the check to specific oracle providers

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the verdict semantics, the mandatory blocking behavior, that a recommended max position size is returned, and an important caveat that PASS is not authorization or a guarantee. It omits operational traits like latency, auth requirements, or failure behavior.

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 purpose and the critical pre-execution timing, then the verdict set, then the caveat. The disclaimer sentence is long but earns its place by limiting liability. Slightly dense, but no filler.

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

Completeness4/5

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

With no output schema, the description does the work of explaining the return values (verdict plus recommended max position size), and the required/optional parameter split is covered by the schema. For a pre-trade safety gate this is nearly complete, though it could say more about what happens on error or timeout.

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 80%, so the schema already documents almost all parameters. The description adds only marginal meaning, restating the action types (swap/borrow/lend/liquidation/repay) that are already in the enum and hinting at trade size via the position-size recommendation, with no added syntax or format guidance.

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 ('pre-trade oracle safety checkpoint') and precisely describes what it produces: an aggregated PASS/CAUTION/DANGER/BLOCK verdict from consensus prices, deviation, freshness, peg status and reputation. This clearly distinguishes it from granular siblings like get_oracle_health or compare_oracle_deviation.

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?

Explicitly says when to call it ('BEFORE executing any on-chain swap/borrow/lend/liquidation/repay') and the hard rule that agents MUST NOT trade on DANGER/BLOCK. It does not name a sibling alternative for narrower checks, but the aggregation scope implies when to use this versus the granular tools.

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.