Skip to main content
Glama

size_position

Check a proposed trade against desk risk limits, compute position size and capital at risk, and get an approved, warning, or veto verdict.

Instructions

Size a trade against the desk's risk limits and rule on whether it passes.

Returns the share count, the capital genuinely at risk, current portfolio
heat from open journalled theses, and every limit checked with its observed
value and threshold. The `verdict` is one of `approved`,
`approved_with_warnings` or `vetoed`; a veto is a refusal, not a preference.

Never work a share count out yourself — this is where a correct thesis
loses money. Anything that could not be checked, such as a missing ATR or
target, appears under `limitations` rather than being assumed to pass.

Args:
    ticker: Stock symbol, e.g. "NVDA".
    direction: "long" or "short".
    entry: Intended entry price.
    stop: Stop price. Must sit below entry for a long, above for a short.
    account_equity: Total account equity the risk budget is drawn from.
    target: Intended exit. Omit only if the chartist gave none.
    atr: ATR(14) from `get_technicals`, to check the stop against noise.
    risk_pct: Requested % of equity at risk. Clamped to the policy maximum.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atrNo
stopYes
entryYes
targetNo
tickerYes
risk_pctNo
directionYes
account_equityYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries full burden and discloses key behaviors: returns multiple computed values, verdict types, handling of missing data via limitations, clamping of risk_pct, and stop/direction constraints. This is rich behavioral disclosure.

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?

The description is dense but well-structured: purpose sentence, return summary, critical caveat, limitation note, then Args. Every sentence adds value and no information is repeated from the schema.

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

Completeness5/5

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

With 8 parameters and an output schema, the description covers all essential aspects: return values, limit checks, verdict semantics, missing data handling, and parameter constraints. The context of the desk risk framework and sibling tools makes its role clear.

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

Parameters5/5

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

The schema provides 0% description coverage, but the Args section gives meaningful explanations for all parameters, including constraints (stop relative to entry), sources (ATR from get_technicals), and defaults (target omitted only if none given). This fully compensates for the schema gap.

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?

The description clearly states the tool's function: sizing a trade against desk risk limits and returning a verdict. It distinguishes this from siblings by focusing on risk assessment rather than execution or data retrieval.

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

Usage Guidelines5/5

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

Explicitly instructs 'Never work a share count out yourself', positioning this tool as the authoritative sizing mechanism. The directive makes the intended use obvious and implies when not to use it (manual calculation).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Saivikaskillamsetty/tradingdesk'

If you have feedback or need assistance with the MCP directory API, please join our Discord server