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 trade_proof) and do not treat its PASS as principal authorization. Returns a verdict (PASS/CAUTION/DANGER/BLOCK), reason codes, oracle evidence and a signed attestation or decision when the family supports one. Deprecated alias: prefer trade_guard with op "check_safety". Removed on 2027-01-06.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chain_id": "<chain_id>",
      "action": "<action>"
    },
    "name": "check_trade_safety"
  }
}

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

A3.9/5.0
Behavior3/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 add real value: it discloses the verdict taxonomy (PASS/CAUTION/DANGER/BLOCK), reason codes, oracle evidence, optional signed attestation, and a deprecation/removal date of 2027-01-06. It does not disclose cost, latency, failure modes when evidence is stale or unavailable, or who can verify the attestation, which are material for a gating tool with no readOnly/destructive hints.

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?

Four tight sentences, front-loaded with the action and scope, then usage timing, then return values, then migration. Every sentence carries information, though the deprecation sentence sits at the end where a high-volume caller might miss a removal date that would ideally be surfaced earlier.

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?

The description compensates for the missing output schema by enumerating the return payload, and correctly documents the deprecation path. For a 32-parameter, nested-object tool spanning five venue families, however, the absence of any parameter-by-action mapping leaves a substantial gap that neither the schema (56% coverage) nor the description closes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only the `guard` parameter gets added meaning ('pass the family native payload here when the venue needs exact-call fields'). Against 32 parameters at 56% schema coverage, there is no guidance on which parameters pair with which `action` value (e.g. borrows/collaterals for borrow, position for check_position, market/side for perps) — the single most important thing an agent needs to construct a valid call.

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 ('Run the pre-trade oracle safety gate') and enumerates the covered domains (swaps, lending, perps, vault deposits, stress tests) and chains (Base, Monad, multichain EVM, Solana, Hyperliquid). It also distinguishes itself from siblings by naming trade_proof for post-execution and trade_guard as the preferred successor.

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?

Gives explicit timing ('immediately before an agent trades or signs'), an explicit anti-pattern ('Do not use it after execution (use trade_proof)'), a scope caveat ('do not treat its PASS as principal authorization'), and a migration instruction pointing at trade_guard with op "check_safety". Nothing about when to select this tool is left to inference.

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.