Skip to main content
Glama

Agent Financial Advisor

Options risk and margin check

options_risk_check

Check an options book (existing or proposed legs) the way a broker's options desk would: covered, cash-secured, spread or naked; margin requirement under FINRA Rule 4210; cash-account limits; required approval level; early-assignment risk around ex-dividend dates; pin risk; auto-exercise of expiring in-the-money longs and the capital it needs; max loss; and net Greeks. Returns approve / approve_with_warnings / reject with reasons. Price: $0.01.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "legs": [
        {
          "side": "short",
          "type": "call",
          "expiry": "2026-11-20",
          "strike": 210,
          "premium": 3.1,
          "quantity": 1
        },
        {
          "side": "short",
          "type": "put",
          "expiry": "2026-11-20",
          "strike": 190,
          "premium": 2.6,
          "quantity": 2
        },
        {
          "side": "long",
          "type": "put",
          "expiry": "2026-11-20",
          "strike": 180,
          "premium": 1.2,
          "quantity": 2
        }
      ],
      "as_of": "2026-10-19",
      "account": {
        "type": "margin",
        "equity": 50000,
        "shares_held": 100,
        "options_level": 3
      },
      "underlying": {
        "price": 200,
        "symbol": "AAPL"
      }
    },
    "name": "options_risk_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
legsYes
as_ofNoDate of the check (YYYY-MM-DD); defaults to today in New York.
policyNoOverrides: pin_band_pct, max_requirement_pct_of_equity, max_delta_dollars_pct_of_equity, assignment_dte, low_extrinsic.
accountYes
api_keyNoOptional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial.
underlyingYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / api_key
      Added value: +{
      +  "description": "Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "account": {
      +      "equity": 50000,
      +      "options_level": 3,
      +      "shares_held": 100,
      +      "type": "margin"
      +    },
      +    "as_of": "2026-10-19",
      +    "legs": [
      +      {
      +        "expiry": "2026-11-20",
      +        "premium": 3.1,
      +        "quantity": 1,
      +        "side": "short",
      +        "strike": 210,
      +        "type": "call"
      +      },
      +      {
      +        "expiry": "2026-11-20",
      +        "premium": 2.6,
      +        "quantity": 2,
      +        "side": "short",
      +        "strike": 190,
      +        "type": "put"
      +      },
      +      {
      +        "expiry": "2026-11-20",
      +        "premium": 1.2,
      +        "quantity": 2,
      +        "side": "long",
      +        "strike": 180,
      +        "type": "put"
      +      }
      +    ],
      +    "underlying": {
      +      "price": 200,
      +      "symbol": "AAPL"
      +    }
      +  }
      +]
  3. Added

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the outcome shape (approve / approve_with_warnings / reject with reasons) and the price ($0.01), which are genuine extras. It does not state that this is a pure simulation with no order placement, that accuracy depends on the caller-supplied underlying price and dividend fields, or how sensitive results are to missing Greeks — meaningful gaps for a financial risk engine.

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?

Purpose is front-loaded in the first clause, and the long checklist of risk areas is dense but each item is substantive rather than filler. The closing sentence on return values and price is well placed, though the middle enumeration is a run-on that could be punctuated more cleanly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description does cover the return envelope, which is the most important omission it could have addressed. However, for a complex six-parameter nested risk engine with no annotations, it lacks key operational context: assumed market-data freshness, how supplied Greeks vs. computed Greeks are reconciled, and limits of the approval logic.

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

Parameters2/5

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

Schema description coverage is only 50% across a nested six-parameter schema, and the description contributes nothing about what legs, account, underlying, policy, as_of or api_key mean. Fields like the 'policy' override object and the Greeks inputs are left entirely to sparse schema text, so the prose does not compensate for the coverage gap at all.

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 opens with a concrete verb and object ('Check an options book … existing or proposed legs') and enumerates the exact analyses performed (covered/cash-secured/spread/naked classification, FINRA 4210 margin, assignment and pin risk, max loss, net Greeks). It is unambiguous about what the tool computes, though it never names or contrasts a sibling such as pre_trade_check or position_size, so an agent must infer the boundary itself.

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?

The phrase 'existing or proposed legs' implies the two main contexts (portfolio review vs. pre-trade validation), and 'the way a broker's options desk would' frames the intent. There is no explicit when-not guidance, no prerequisites (e.g., 'supply a current underlying price'), and no routing to alternatives like pre_trade_check or suitability_check.

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.