Skip to main content
Glama

margin_requirements

Calculate margin requirements for a hypothetical trade using an order what-if, so you can assess buying power and risk before placing it.

Instructions

Get margin requirements for a hypothetical trade (uses order what-if).

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": {
      "contract": "<contract>",
      "quantity": "<quantity>",
      "side": "<side>"
    },
    "name": "margin_requirements"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYesBUY or SELL
contractYesContract specification
quantityYesNumber of shares/contracts

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.5/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, and it does add one meaningful trait: the calculation runs via order what-if, implying no real order is submitted. It does not explicitly confirm the operation is non-mutating, nor does it mention permissions, latency, or that the quantity/side combination must be internally consistent.

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

Conciseness5/5

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

A single front-loaded sentence with the resource first and the mechanism as a compact parenthetical. No filler, nothing to trim, and the key scoping word 'hypothetical' lands early.

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?

For a tool with no annotations, no output schema, and an opaque nested contract object, the description is thin: it never says whether the result covers initial and maintenance margin or per-leg detail. It is adequate to select the tool but leaves real gaps for correct invocation.

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 baseline is 3; the description adds no parameter-level meaning. Notably, 'contract' is a nested object whose internal fields are undefined in both schema and description, leaving the agent to guess what contract specification to supply.

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?

States a specific verb and resource ('Get margin requirements') and scopes it to a hypothetical trade, which an agent can distinguish from real order-placement siblings. The parenthetical '(uses order what-if)' clarifies the mechanism but stops short of naming a sibling such as buying_power as the contrasting alternative.

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?

'Hypothetical trade' implies a pre-trade simulation use case rather than an actual order, which is useful implicit guidance. However, there is no explicit statement of when to prefer this over buying_power or account_values, and no prerequisites or exclusions are given.

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

Deploy Server

Other Tools