Skip to main content
Glama

trade_guard

Use it for every pre-execution trust decision: one oracle price, price analytics, oracle health, oracle registry search, a venue market quote, or the pre-trade safety gate including prepare_swap and prepare_perp_order. Each call selects the branch with "op". Do not use it to prove execution after the fact (use trade_proof), to poll a prepaid monitoring window (use oracle_watch_window), or to manage a position bundle (use position_lifecycle). Returns the op payload: price and analytics rows for read ops, a venue quote for market_quote, a PASS/CAUTION/DANGER/BLOCK verdict with reasons for check_safety, and an unsigned prepared transaction, Solana message, venue order or instruction for prepare_* ops. Absorbs the deprecated names get_oracle_price, get_price_analytics, get_oracle_health, search_oracle_registry, get_market_quote, check_trade_safety, prepare_swap and prepare_perp_order. Metering: oracle_price, market_quote and search_registry are 2 credits ($0.002); price_analytics and oracle_health are 4 credits ($0.004); check_safety, prepare_swap and prepare_perp_order are 40 credits ($0.040), which is both the per-call price and the product ceiling. Deprecated alias spellings are callable at the same price until 2027-01-06.

Input Schema

NameRequiredDescriptionDefault
opYes
toNoEnd date YYYY-MM-DD
dateNoReport date YYYY-MM-DD
daysNoLookback days for rankings/trends
fromNoStart date YYYY-MM-DD
kindNoRegistry/evidence family to search
modeNo
sideNoPerp side
assetNoAsset symbol, e.g. BTC, ETH
chainNoOptional blockchain filter, e.g. base
guardNoExact-call guard input for family-specific exact tools
limitNo
orderNoExact Hyperliquid order envelope
queryNoSearch or lookup term (symbol, protocol, slug)
scopeNoWhich health surface to readecosystem
vaultNo
venueNo
actionNoTrade action being considered
assetsNoAssets to analyse; consensus/risk/history use the first asset
marketNoHyperliquid perp market
methodNoConsensus aggregation method
metricNo
offsetNoPagination offset
periodNoPeriod in hours or days
policyNo
venuesNoBase venue ids to inspect
walletNo
borrowsNo
subjectNoFeed UUID, provider, protocol, or asset symbol depending on scope
categoryNoFeed category filter
chain_idNo
intervalNoDeviation interval, default 24h
positionNoPosition payload for action=check_position
providerNoOracle provider, e.g. chainlink, redstone, api3
amount_inNoExact input amount as a decimal string
directionNo
is_activeNoFeed active-state filter, default true
market_idNoIsolated lending market id when required
providersNo
recipientNo
amount_usdNoTrade size in USD
asset_mintNo
base_chainNoBase chain name for metric=spreads
input_mintNoSolana base58 mint sold; required for venue=solana_jupiter
profile_idNoReviewed pool/profile id. PancakeSwap V3: base-pancakeswap-v3-usdc-usdt-100, bnb-pancakeswap-v3-usdt-usdc-100, bnb-pancakeswap-v3-usdt-wbnb-100
collateralsNo
loan_symbolNo
output_mintNoSolana base58 mint bought; required for venue=solana_jupiter
protocol_idNoLending/protocol id
transactionNoExact unsigned transaction for exact-call guards
margin_assetNo
min_severityNo
period_hoursNoRisk/history hours
borrow_amountNo
borrow_symbolNo
force_refreshNoBypass cache and re-read upstream
min_lp_amountNo
token_addressNo
debt_value_usdNo
decision_inputNoCaller decision/quote evidence (old camelCase shape)
verify_onchainNoFor RWA lookups, cross-check on chain
margin_value_usdNo
max_slippage_bpsNo
principal_amountNo
collateral_amountNo
collateral_symbolNo
destination_assetNoDestination asset for swaps
reputation_opt_inNo
reputation_agent_idNo
collateral_value_usdNo
deadline_unix_secondsNo
source_decision_price_usdNo
destination_decision_price_usdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / base_chain / description
      Previous value: -"Base chain for metric=spreads"New value: +"Base chain name for metric=spreads"
  2. Added

TDQS

A4.2/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 mostly succeeds: it discloses per-op return payloads, the PASS/CAUTION/DANGER/BLOCK verdict shape, the fact that prepare_* returns an unsigned transaction/message/order rather than executing, and per-op credit costs. It does not cover auth requirements, failure behavior of the safety gate, or caching semantics beyond the existence of force_refresh.

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 use case, then exclusions, then returns, then deprecation, then metering — a sensible order with no filler. The opening sentence is dense and the metering sentence is long, but each sentence carries information an agent needs.

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?

For a tool with 8 branches and 73 parameters, no annotations, and no output schema, the description is unusually rich on returns, cost, and aliases. The residual gap is the combinatorial parameter space: nothing tells an agent which subset of fields belongs to which op, which is the main way this definition could be misused.

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 only 53% across 73 parameters, so the description must compensate, and it does so only partially: it explains op semantics, the return per op, and per-op pricing, but never maps parameters to branches (e.g. which fields apply to prepare_perp_order vs check_safety). An agent must infer applicability from parameter names and enum values alone.

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 states a specific role — pre-execution trust decisions — and enumerates every branch it covers (oracle price, analytics, health, registry search, venue quote, safety gate, prepare_swap/prepare_perp_order). It also names the sibling tools it is not (trade_proof, oracle_watch_window, position_lifecycle), so an agent can route without opening any schema.

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 ("every pre-execution trust decision") paired with three explicit when-not-to-use clauses, each naming the alternative and the condition that selects it. The dispatch rule ("Each call selects the branch with 'op'") closes the remaining loop on invocation.

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.

Resources