Skip to main content
Glama
Agent Trading Desk

Agent Trading Desk

pre_trade_check

Evaluates trade risk across market regime, historical loss, and adversarial microstructure traps to return an authoritative ALLOW or VETO verdict before DEX execution.

Instructions

The Master Zero-Hallucination Pre-Trade Risk Gate (§5): synthesizes Layer 1 Market Regime, Layer 2 Historical Loss Quarantine, Layer 3 Adversarial AI Trap Shield (VPIN toxicity, L2 spoof walls, CVD flow divergence), and dynamic SMA retest zones in a single sub-second evaluation. Grounded in real on-chain execution telemetry. Returns an authoritative ALLOW or VETO verdict with explicit causal reasons. Mandatory before DEX execution.

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": {
      "symbol": "<symbol>"
    },
    "name": "pre_trade_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideNoAlias for action ("LONG" or "SHORT")
actionNoCandidate trade direction ("LONG" or "SHORT")
symbolYesThe asset pair symbol (e.g. "SOL/USD", "BTC/USD", "ETH/USD")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does disclose several traits: sub-second evaluation, synthesis of multiple risk layers, on-chain telemetry grounding, and an authoritative ALLOW/VETO result with causal reasons. It leaves gaps around failure behavior, idempotency, and whether it only evaluates or also blocks execution, but it is far more informative than a bare label.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is front-loaded with the core synthesis and verdict behavior, which is good, but it is padded with promotional wording like 'Master Zero-Hallucination' and 'authoritative.' The content is useful but not tightly edited.

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?

For a three-parameter gate with no output schema, the description explains the evaluation layers, latency expectation, and the ALLOW/VETO return shape. It could be more complete about the side/action alias behavior and error cases, but the core call context is present.

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 the input schema already documents symbol, side, and action, including enum values. The description adds no parameter-level guidance, such as how to choose between side and action or what happens if both are supplied, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific pre-trade risk-gate purpose: it synthesizes market regime, historical loss quarantine, trap-shield signals, and SMA zones into a single evaluation that returns ALLOW or VETO. That distinguishes it from sibling layer-evaluation tools like evaluate_trap_shield and get_market_regime, though the 'Master Zero-Hallucination' framing adds noise rather than clarity.

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?

It gives a clear usage condition: 'Mandatory before DEX execution.' That tells the agent when this tool is expected, but it does not describe when-not-to-use cases or name alternatives for lighter checks, so it stops short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.