Skip to main content
Glama

finance position size

finance_position_size
Read-only

Position sizing from risk: give account size, the percent you are willing to lose, entry and stop, and get the units to buy or short, notional, margin at your leverage, and the exact loss at the stop including fees. Add a target for reward-to-risk and the breakeven win rate, and a win rate for the Kelly fraction and whether your risk is above it. Works for stocks, crypto, perps and forex. $0.002. Costs $0.002 USDC per call (x402).

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": {
      "account": "<account>",
      "entry": "<entry>",
      "stop": "<stop>"
    },
    "name": "finance_position_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
stopYes
entryYes
targetNo
accountYes
leverageNo
win_rateNo% of trades that hit target
fee_percentNoper side
risk_percentNodefault 1

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, and the description adds genuinely useful context beyond them: the x402 payment of $0.002 USDC per call (a prerequisite an agent must know), the asset classes covered (stocks, crypto, perps, forex), and what the computed outputs mean. It does not spell out failure modes, such as a stop on the wrong side of entry, so it stops 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?

Front-loaded with the core verb and inputs, then outputs, then optional extensions — good ordering. The closing price information is redundantly stated twice ('$0.002.' then 'Costs $0.002 USDC per call (x402).'), which is waste an agent must read past.

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 no output schema, the description must explain what comes back, and it does: units, notional, margin at leverage, exact loss at stop including fees, and optionally reward-to-risk, breakeven win rate, and Kelly fraction with a risk-above-Kelly flag. Combined with the payment disclosure, an agent has everything needed to call and interpret the result.

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

Parameters4/5

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

Schema coverage is only 38% (account, entry, stop, target, leverage are undocumented in the schema), so the description has to compensate and largely does: fee_percent is 'per side' and folded into the loss at stop, target unlocks reward-to-risk and breakeven win rate, win_rate drives the Kelly fraction, and leverage determines margin. It still does not state units or conventions, e.g. that risk_percent defaults to 1 and whether entry/stop are absolute prices, leaving a small 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?

States a specific computation ('Position sizing from risk') and enumerates both the inputs (account size, percent willing to lose, entry, stop) and the outputs (units, notional, margin, exact loss at stop including fees). This is unmistakably distinct from finance_amortization, finance_npv, or finance_options_price, so an agent can route to it without opening a schema.

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 description makes the usage context clear ('position sizing from risk', plus the optional add-ons for target and win rate), which implies when to call it. However, it names no alternatives and gives no when-not guidance, such as how it relates to finance_portfolio_risk or perps for exposure questions.

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