Skip to main content
Glama

EdgeVault

Size a position from a stop

size_position
Read-onlyIdempotent

Works out the position size for a stop and a risk on the venue's own published rules. It returns the units, margin and leverage, the loss at the stop in dollars and R, the liquidation price and, with a target, the reward and the reward to risk. Facts only, never advice.

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": {
      "venue": "<venue>",
      "market": "<market>",
      "side": "<side>",
      "entry": "<entry>",
      "stop": "<stop>",
      "account_usd": "<account_usd>"
    },
    "name": "size_position"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYes
stopYesStop price
basisNoWhich loss the risk capssoft_stop
entryYesEntry price
venueYesVenue
detailNofull adds sources and notessummary
marketYesTicker, such as SOL
targetNoTarget price
leverageNoLeverage to size at
risk_usdNoRisk in US dollars. This or risk_percent
auto_sizeNoDesk Auto size
account_usdYesAccount size in USD
margin_modeNoMargin modeisolated
risk_percentNoRisk as a percent of the account. This or risk_usd

Output Schema

NameRequiredDescriptionDefault
rrYes
sideYes
stopYes
unitYes
basisNo
entryYes
notesNo
unitsYes
venueYes
detailYes
marketYes
targetYes
missingYes
rr_textNo
sourcesNo
summaryYes
leverageYes
risk_usdYes
sized_soNo
auto_sizeNo
size_fromNo
margin_usdYes
reward_usdYes
venue_nameNo
account_usdNo
margin_modeNo
notional_usdYes
worst_case_rNo
margin_noticeNo
loss_at_stop_rNo
worst_case_usdYes
worst_case_textNo
liquidation_textNo
loss_at_stop_usdYes
liquidation_priceYes
loss_at_stop_textNo
leverage_at_venue_maxNo
loss_at_liquidation_rNo
loss_at_liquidation_usdYes
loss_at_liquidation_textNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, idempotentHint=true, destructiveHint=false), so the bar is lower, and the description still adds real context: results are computed under the venue's own published rules, and the output is explicitly 'facts only, never advice' — a meaningful framing cue for how the agent should relay it. It does not explain behavior for ambiguous inputs (e.g. what happens when neither risk_usd nor risk_percent is supplied, or how auto_size overrides manual sizing), which keeps it below a 5.

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?

Two sentences, front-loaded with the purpose before the output enumeration, and no filler. The middle clause is a fairly dense list of return fields that partially duplicates the output schema, but it does usefully signal what the tool produces at a glance.

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?

For a 14-parameter, 6-required tool, the definition, annotations, high-coverage schema, and an output schema together give an agent enough to call it correctly. The remaining gap is behavioral rather than descriptive: no guidance on the mutually exclusive risk inputs or on how auto_size interacts with explicit leverage.

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 93%, so the schema already documents all 14 parameters including the basis, detail, and margin_mode enums; baseline 3 applies. The description adds only one piece of meaning beyond the schema — that supplying 'target' changes the returned reward and reward-to-risk figures — while the risk_usd/risk_percent exclusivity and auto_size mechanics are left entirely to the schema.

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+resource pair — 'works out the position size' — plus the governing scope ('for a stop and a risk on the venue's own published rules'), which tells the agent the numbers are venue-specific rather than a generic formula. The sibling tools (list_recent_events, study_market_event) are unrelated to sizing, so no in-family disambiguation is required.

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?

Usage is implied rather than stated: the required parameters (venue, market, side, entry, stop, account_usd) sketch the calling context, and 'with a target, the reward and the reward to risk' hints at the optional-target path. There is no explicit when-to-use/when-not guidance and no statement of prerequisites such as needing a published rule set for the venue.

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.

Resources