Skip to main content
Glama

Stop coverage check

stop_coverage_check
Read-onlyIdempotent

Compares positions with the orders actually resting at the broker. Flags: a position over the size cap with no resting stop, or a stop covering only part of it; any good-for-day order (gone at the close); resting sells exceeding shares held with no link between the legs; resting orders in names not held. With journal text in this repo's JOURNAL.template.md format, it also checks each written price gate (stops, sell limits, dated exits) against the resting orders and lists any gate it could not read as UNCHECKED rather than passing. Positions: symbol, quantity, and market value or last price. Orders: symbol, side, quantity, order type, limit price, stop price, term (GTC/day), status; the text "none" means no open orders. Nothing pasted is stored. Example: {"positions_csv": "symbol,quantity,last_price\nKO,200,70.10\nAAPL,120,229.80", "orders_csv": "symbol,side,quantity,order_type,stop_price,term\nKO,sell,200,stop,62,GTC", "cap_pct": 25}.

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": {
      "positions_csv": "<positions_csv>",
      "orders_csv": "<orders_csv>"
    },
    "name": "stop_coverage_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
cashNoCash in the account, for position weights (default: a cash row in the export, else 0)
cap_pctNoPosition size, % of the account, above which a stop is expected (default 28)
orders_csvYesOpen orders as CSV text, or "none"
journal_textNoOptional trading journal in this repo's template format
positions_csvYesPositions export as CSV text, header row included

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds real behavioral context beyond them: pasted input is not stored, and unreadable price gates are surfaced as UNCHECKED rather than silently passing. Only the return shape of the flag list is left implicit.

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 flag conditions are front-loaded ahead of the input format notes and the compact JSON example, so the most decision-relevant content comes first. The middle sentences listing position and order columns are dense but slightly redundant with the schema.

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 no output schema, the description carries the burden of conveying results, and it does so by naming the flag categories and the UNCHECKED outcome. It is nearly complete for a read-only audit tool, lacking only an explicit statement of the response container (list vs. text report).

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 coverage is 100%, so the top-level parameters are already documented, including cap_pct's default of 28 and cash's fallback. The description adds value by specifying the required CSV columns for positions and orders and the 'none' sentinel, but much of that field enumeration largely restates the schema's intent.

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 — comparing held positions against orders actually resting at the broker — and then enumerates the exact conditions it flags (uncovered oversize position, partial stop coverage, day orders, oversells without linked legs, orders in unheld names). This enumeration makes it unmistakable versus a plain 'positions without stop loss' listing.

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 description makes clear this is a cross-check that requires both positions and broker orders, and that journal text is optional for the extra price-gate check. It does not name sibling tools or state explicit exclusions, so an agent must infer when to prefer this over simpler position-screening tools.

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.