Skip to main content
Glama

Validate Order

warden.validate_order
Read-onlyIdempotent

Validates a proposed order against house exposure floors and reports any deviation, rejecting orders that breach position or gross limits.

Instructions

Validate a proposed order against the house floors (max position 25%, gross cap 60%).

order: {symbol, notional, side: buy|sell}; current_positions: {symbol: notional}. Per-fund overrides are allowed but the response always reports the deviation from the house floors. Rejections quote the exact floor — the same function gating live capital.

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": {
      "order": "<order>",
      "equity": "<equity>"
    },
    "name": "warden.validate_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderYesProposed order: {symbol, notional, side: buy|sell}.
equityYesAccount equity (base currency) used for the exposure floors.
floor_overridesNoOptional per-fund overrides {max_position_pct, max_gross_exposure_pct}; the response always reports the deviation from the house floors.
current_positionsNoOptional {symbol: notional} map of current positions.

Output Schema

NameRequiredDescriptionDefault
howNo
toolNo
errorNo
accessNo
safetyNo
verdictNo
provenanceNo
violationsNo
house_floorsNo
fund_overridesNo
post_gross_pctNo
rejection_quoteNo
post_position_pctNo
request_access_atNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.2.1
    • removedOutput schema / properties / fund_overrides / additionalProperties
      Removed value: -true
    • addedOutput schema / properties / fund_overrides / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / fund_overrides / type
      Removed value: -"object"
    • addedOutput schema / properties / rejection_quote / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / rejection_quote / type
      Removed value: -"string"
  2. First observedv0.4.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantive behavior beyond that: the concrete floor values (25% position, 60% gross), the fact that per-fund overrides are permitted but the response always reports deviation from house floors, that rejections quote the exact breached floor, and that this is the same code path gating live capital. Minor gaps remain (no mention of what a partial pass or missing current_positions produces), but the disclosure is well above annotation-level.

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 core purpose and thresholds are front-loaded in the first sentence, with supporting detail after. The inline '{symbol, notional, side: buy|sell}' and '{symbol: notional}' restatements duplicate the schema and could be dropped without loss.

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?

An output schema exists, so return values need not be described, and the schema covers all four parameters including nested object shapes. The description supplies the business rules, override behavior and rejection semantics that the structured fields cannot express, leaving only minor unstated edge cases.

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?

With 100% schema description coverage, the schema already documents order, equity, floor_overrides and current_positions, and the description largely restates those shapes. The one value-add is the override/deviation semantics, which also appears in the schema, so this sits at the baseline.

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 (validate) and resource (a proposed order) plus the exact rule set applied (max position 25%, gross cap 60%). This clearly separates it from sibling validators like validate_genome and from adjacent analytical tools such as explain_sizing or plan_rebalance.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the sentence 'the same function gating live capital' signals this is a pre-trade gate, but there is no explicit when-to-use / when-not-to-use guidance and no named alternative. An agent can infer the call context but must guess whether to use this versus cost_check or plan_rebalance first.

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