Skip to main content
Glama

crashtestyourstrategy

IPS gate — planning-step constraint check (hard gate)

ips_gate
Read-onlyIdempotent

USE WHEN you have an Investment Policy Statement (drawdown tolerance, horizon, liquidity need) and want a portfolio checked against it. Flags a violation when the MEDIAN sustained drawdown exceeds max_drawdown_tolerance (a fraction, e.g. 0.15) or the tolerance is breached in a third or more of paths (the worst path and p90 may lie beyond it; see worst_stress); when time_horizon_years < 3 with a median drawdown of 15% or more; or when material holdings are less liquid than liquidity_need. A hard gate, not a score. Descriptive, not advisory.

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": {
      "holdings": "<holdings>"
    },
    "name": "ips_gate"
  }
}

Input Schema

NameRequiredDescriptionDefault
holdingsYesPortfolio legs: list of {asset, weight} objects, e.g. [{'asset': 'SPY', 'weight': 0.6}, {'asset': 'TLT', 'weight': 0.4}]. Assets: SPY, TLT, GOLD, BTC (aliases GLD, BTC-USD). Weights are non-negative and normalised to sum to 1; at most 50 legs, no duplicates.
liquidity_needNo'low' | 'medium' | 'high' — violated when material holdings are less liquid than the stated need.
time_horizon_yearsNoInvestment horizon stated in the IPS; short horizons cannot absorb deep drawdowns.
max_drawdown_toleranceNoIPS drawdown tolerance as a fraction, e.g. 0.15 = a -15% maximum acceptable drawdown.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / holdings / description
      Previous value: -"Portfolio legs: list of {asset, weight} objects, e.g. [{'asset': 'SPY', 'weight': 0.6}, {'asset': 'TLT', 'weight': 0.4}]. Weights are normalised to sum to 1; assets must be in the substrate universe."New value: +"Portfolio legs: list of {asset, weight} objects, e.g. [{'asset': 'SPY', 'weight': 0.6}, {'asset': 'TLT', 'weight': 0.4}]. Assets: SPY, TLT, GOLD, BTC (aliases GLD, BTC-USD). Weights are non-negative and normalised to sum to 1; at most 50 legs, no duplicates."
  2. Changed4 schema fields changed
    • addedInput schema / properties / holdings / description
      Added value: +"Portfolio legs: list of {asset, weight} objects, e.g. [{'asset': 'SPY', 'weight': 0.6}, {'asset': 'TLT', 'weight': 0.4}]. Weights are normalised to sum to 1; assets must be in the substrate universe."
    • addedInput schema / properties / liquidity_need / description
      Added value: +"'low' | 'medium' | 'high' — violated when material holdings are less liquid than the stated need."
    • addedInput schema / properties / max_drawdown_tolerance / description
      Added value: +"IPS drawdown tolerance as a fraction, e.g. 0.15 = a -15% maximum acceptable drawdown."
    • addedInput schema / properties / time_horizon_years / description
      Added value: +"Investment horizon stated in the IPS; short horizons cannot absorb deep drawdowns."
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, and the description goes further by spelling out the exact violation rules: median sustained drawdown above tolerance, breach in a third or more of paths, horizon under 3 years with 15%+ median drawdown, and illiquidity versus the stated need. It also sets expectations that the output is a gate verdict rather than an advisory score, though 'material holdings' is left unquantified.

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 trigger is front-loaded as 'USE WHEN', followed by a compact enumeration of violation conditions and a closing qualifier. The parenthetical about worst path and p90 is dense but earns its place by pre-empting a misreading of the gate.

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?

With an output schema available, return values need no explanation, and annotations cover the safety profile; the description supplies the decision logic that neither structured field carries. Only minor gaps remain, such as what counts as a 'material' holding by weight.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not carry: how max_drawdown_tolerance, time_horizon_years, and liquidity_need combine into verdict conditions (e.g. horizon under 3 years plus a 15% median drawdown). This raises it above the schema-only 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 and resource: check a portfolio against an Investment Policy Statement and flag violations. The phrase 'A hard gate, not a score' explicitly separates it from scoring-oriented siblings such as run_stress_test or tier2_stress_test, so an agent can route to it without opening another schema.

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?

The 'USE WHEN you have an Investment Policy Statement (drawdown tolerance, horizon, liquidity need)' opener gives a concrete triggering condition, and pointing to worst_stress for the tail-path view implies an alternative for that question. It stops short of an explicit when-not statement or a named sibling exclusion.

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.