Skip to main content
Glama

Trading Signals Toolkit

ATR Stop + Position Size

atr_stop
Read-only

Wilder ATR, an ATR-multiple price level, and position size from account risk %. Read-only, never places orders. Informational only, not investment 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": {
      "bars": "<bars>"
    },
    "name": "atr_stop"
  }
}

Input Schema

NameRequiredDescriptionDefault
barsYesOHLCV bars, oldest first: {t (ISO-8601 or epoch s/ms), o, h, l, c, v} or [t,o,h,l,c,v]. Max 5000.
sideNo
entryNoEntry price (default last close)
periodNoATR period (default 14)
riskPctNo% of account risked (default 1)
multiplierNoPrice-level distance = ATR × multiplier (default 2)
pointValueNo$ per point per contract (ES = 50)
accountSizeNoAccount equity

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / multiplier / description
      Previous value: -"Stop = ATR × multiplier (default 2)"New value: +"Price-level distance = ATR × multiplier (default 2)"
  2. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so 'never places orders' largely restates structured data. The description adds no operational context such as what happens when optional inputs like accountSize or pointValue are omitted, or why idempotentHint is false for a pure computation. The safety disclaimer has some value but is not behavioral detail about the computation itself.

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 definition is compact and front-loads the three computed outputs before the disclaimers. However, it reads as a sentence fragment rather than a structured statement, and the legal disclaimer occupies a disproportionate share of a very short description.

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 an 8-parameter calculation tool with no output schema, the description does mention the three results produced, which partially covers return values. It does not explain how the parameters combine (e.g., that position size requires accountSize, riskPct, and pointValue, and how side affects the level direction), leaving meaningful gaps for a non-trivial calculator.

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 nearly every parameter including defaults for period, entry, riskPct, and multiplier. The description only echoes 'ATR-multiple' and 'account risk %', adding no meaning beyond what the schema provides. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

The description names the specific computation set: Wilder ATR, an ATR-multiple price level, and position size derived from account risk percent. That is concrete enough to distinguish it from siblings like vwap_bands or opening_range, which compute different indicators. It stops short of explicitly naming a sibling it is not, so it lands at 4 rather than 5.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not guidance. 'Read-only, never places orders. Informational only, not investment advice.' tells the agent about safety and liability, not about which situations call for this tool versus pre_trade_check or event_gate. The agent must infer that this is a stop/sizing calculator from the purpose line alone.

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