Skip to main content
Glama

Position Size

position_size
Read-onlyIdempotent

Risk-based position sizing for trading agents: from account balance, risk per trade (percent or fixed amount), entry and stop price returns units to buy/sell, notional, leverage needed, stop distance, and with a target the reward:risk ratio, profit at target and break-even win rate. Optional fees and lot-size rounding. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/position-size

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": {
      "accountBalance": "<accountBalance>",
      "entryPrice": "<entryPrice>",
      "stopPrice": "<stopPrice>"
    },
    "name": "position_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
feePctNoFee per side in percent of notional (included in the risk)
lotSizeNoRound units down to this step (e.g. 0.001 BTC, 1 share)
riskPctNoPercent of the account to risk
stopPriceYesStop loss; below entry = long, above = short
entryPriceYes
riskAmountNoFixed amount to risk (overrides riskPct)
targetPriceNoOptional take-profit
accountBalanceYesAccount equity

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, so the bar is lower; the description still adds real operational context by disclosing the $0.001 USDC per-successful-call charge (x402/Solana) and an equivalent HTTPS endpoint. It also enumerates the computed outputs, which matters because no output schema exists. It does not mention rate limits or failure behavior, keeping it short of 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?

The computational purpose and output list are front-loaded in one dense sentence, followed by the price and alternate-endpoint lines. Every sentence carries information, though the first sentence is heavily comma-stacked and would scan faster broken up.

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 8 parameters, no output schema, and a paid transport, the description covers the right ground: what is computed, what is returned, optional modifiers, cost, and an alternate access path. The only meaningful gap is the absence of direction semantics (stop below entry = long) and any note on computational edge cases such as stop equal to entry.

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 88%, so the schema already documents defaults, ranges and overrides. The description adds only a light gloss — risk as 'percent or fixed amount,' optional target and rounding — which duplicates rather than extends the schema, and it omits the long/short direction rule that the stopPrice doc carries.

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 ('risk-based position sizing'), the inputs it consumes (balance, risk, entry, stop, target), and the exact outputs produced (units, notional, leverage, stop distance, reward:risk, break-even win rate). This is unmistakably distinct from numeric siblings like liquidation_price or portfolio_metrics.

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 'for trading agents' framing and the mention of optional fees/lot rounding imply the use case, and the required trio of balance/entry/stop clarifies prerequisites. But it never states when NOT to use it or names an alternative sibling (e.g. liquidation_price or impermanent_loss) for adjacent trading math, leaving routing to inference.

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