Skip to main content
Glama

check_trade_safety

Run the pre-trade oracle safety gate for swaps, lending, perps, vault deposits and position stress tests across Base, Monad, multichain EVM, Solana and Hyperliquid. Use it immediately before an agent trades or signs, and pass the family native payload in guard when the venue needs exact-call fields. Do not use it after execution (use issue_execution_receipt) and do not treat its ALLOW as principal authorization. Returns a verdict (ALLOW/CAUTION/DANGER/BLOCK), reason codes, oracle evidence and a signed attestation or decision when the family supports one.

Input Schema

NameRequiredDescriptionDefault
dateNoDate for liquidation stress
modeNoGeneric oracle gate mode when no family-specific guard appliespre_trade
sideNoPerp side
assetNoAsset traded or collateral symbol
guardNoExact-call guard input for family-specific exact tools
orderNoExact Hyperliquid order envelope
actionYesTrade action being considered
marketNoPerp market
borrowsNo
chain_idYesExecution chain: numeric EVM id, "solana", or "hyperliquid"
positionNoPosition payload for action=check_position
market_idNoIsolated lending market id when required
providersNoOracle providers to gate on
amount_usdNoTrade size in USD
profile_idNoReviewed pool/profile id
collateralsNo
loan_symbolNo
protocol_idNoLending/protocol id
transactionNoExact unsigned transaction for exact-call guards
margin_assetNo
borrow_amountNo
borrow_symbolNo
token_addressNo
debt_value_usdNo
decision_inputNoCaller decision/quote evidence (old camelCase shape)
margin_value_usdNo
collateral_amountNo
collateral_symbolNo
destination_assetNoDestination asset for swaps
reputation_opt_inNo
reputation_agent_idNo
collateral_value_usdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the return payload (verdict with ALLOW/CAUTION/DANGER/BLOCK, reason codes, oracle evidence, signed attestation) and the important caveat that ALLOW is not principal authorization. It does not state whether the call is read-only, whether it records evidence, or what its cost or rate limits are.

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 text is front-loaded with purpose, then timing, exclusions, and the return shape. Four dense sentences all earn their place, though the laundry list of venues and chains in sentence one is slightly heavy.

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?

This is a complex, 32-parameter, polymorphic tool with nested objects and no output schema, and the description does cover the return values and the pre-trade gate's role. However, because it does not map the `action` values to the required parameter subsets (position, order, borrows, collaterals, market/side), an agent must infer this from the schema alone.

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 56%, so half the parameters rely on the description. The description adds real meaning only for `guard` (a family-native exact-call payload) and `mode`, and it does not explain which parameters each `action` enum value requires. That mapping is the main thing an agent needs, yet it is missing, so the baseline 3 applies.

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: a pre-trade oracle safety gate. It names the covered action families (swaps, lending, perps, vault deposits, stress tests) and the chains (Base, Monad, EVM, Solana, Hyperliquid), which is enough for an agent to tell it apart from sibling tools such as get_oracle_price or prepare_swap.

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?

It gives explicit timing ('immediately before an agent trades or signs'), an explicit exclusion ('do not use it after execution'), names the alternative to use instead (issue_execution_receipt), and warns that its ALLOW result is not principal authorization.

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