Skip to main content
Glama

Collar Guardrail — Pre-Trade Risk Layer

Evaluate Trade (Free)

evaluate_trade
Read-onlyIdempotent

Pre-trade risk check for a proposed trade. Call this BEFORE executing any trade and treat a "deny" decision as a hard stop.

Evaluated at a fixed Tier 1 ceiling ($5,000 notional). For higher limits, use evaluate_trade_paid (Tier 2, $25,000) which settles an x402 payment on-chain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYes"buy" or "sell".
assetYesAsset symbol, e.g. NVDA, AAPL, TSLA, USDG.
amountYesQuantity in token units — NOT a pre-computed USD value.
walletYesEVM wallet address (0x...) the trade would execute from.
request_idNoOptional idempotency key.
contract_addressYesToken contract address (0x...). Must match the official registry address for that symbol, or the trade is denied as a suspected fake token.
max_slippage_bpsNoMax slippage in basis points (default 100).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tierNoTier the wallet was evaluated at (1-3).
errorNoIf present, no verdict was produced. Treat as a hard stop; do not execute the trade.
detailNoHuman-readable detail accompanying `error`, if any.
reasonsNoHuman-readable reasons. Entries prefixed with 'ADVISORY:' are non-blocking context; all other entries drove the decision.
decisionNoFinal verdict. 'deny' is a hard stop.deny
guidanceNoSuggested next step accompanying `error`, if any.
audit_seqNoMonotonic sequence number of this decision.
price_usdNoAsset price used for the valuation.
audit_hashNoSHA-256 hash chaining this decision.
request_idNoEchoed idempotency key, if provided.
risk_scoreNoComposite risk score from 0 (safe) to 100 (blocked).
price_sourceNoWhere the price came from.unavailable
max_trade_usdNoUSD ceiling for this tier.
calculated_notional_usdNoUSD value of the proposed trade.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedOutput schema / properties / calculated_notional_usd / default
      Added value: +0
    • addedOutput schema / properties / decision / default
      Added value: +"deny"
    • addedOutput schema / properties / detail
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Human-readable detail accompanying `error`, if any."
      +}
    • addedOutput schema / properties / guidance
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Suggested next step accompanying `error`, if any."
      +}
    • addedOutput schema / properties / max_trade_usd / default
      Added value: +0
    • addedOutput schema / properties / price_source / default
      Added value: +"unavailable"
    • addedOutput schema / properties / price_usd / default
      Added value: +0
    • addedOutput schema / properties / risk_score / default
      Added value: +100
    • addedOutput schema / properties / tier / default
      Added value: +1
    • removedOutput schema / required
      Removed value: -[
      -  "decision",
      -  "reasons",
      -  "tier",
      -  "max_trade_usd",
      -  "calculated_notional_usd",
      -  "price_usd",
      -  "price_source",
      -  "risk_score"
      -]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds genuine extra context beyond that: the $5,000 Tier 1 evaluation ceiling, the hard-stop semantics of a deny, and the fact that the paid variant settles an x402 payment on-chain.

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?

Two tight paragraphs with zero filler. The critical directive (call before executing; deny is a hard stop) is front-loaded ahead of the tier/alternative details.

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?

An output schema exists, so return values need no explanation, and annotations carry the safety profile. The description supplies everything else an agent needs: timing, hard-stop behavior, limit ceiling, and the correct routing to the paid sibling.

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 100%, so all seven parameters (including the amount-is-token-quantity and contract-address-registry warnings) are already documented in the schema. The description adds no per-parameter syntax or format detail, so the baseline 3 applies. The tier ceiling it mentions is decision context, not parameter semantics.

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 risk check for a proposed trade') and immediately distinguishes itself from the sibling evaluate_trade_paid by naming the Tier 1 $5,000 ceiling. An agent can tell exactly what this does and how it differs from its paid counterpart.

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 ('call this BEFORE executing any trade'), an outcome rule ('treat a "deny" decision as a hard stop'), and a named alternative with the condition that selects it ('for higher limits, use evaluate_trade_paid'). Nothing 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.

Resources