Skip to main content
Glama

Average True Range (ATR)

GetAverageTrueRange
Read-only

Calculate a stock's Average True Range (ATR) to measure volatility for position sizing and stop placement.

Instructions

Average True Range (ATR) for a stock. Wilder's volatility measure built from the True Range (max of high-low, |high-prev_close|, |low-prev_close|) and smoothed recursively. Higher ATR means wider daily moves; commonly used for position sizing and stop placement. ATR is denominated in the stock's price units (USD for a US listing, the listing's own quote unit otherwise). The smoothing is warmed up on price history fetched before startDate, so values do not depend on the requested range's left edge.

Input Schema

NameRequiredDescriptionDefault
periodNoSmoothing window (default: 14)
tickerYesStock ticker symbol (e.g., AAPL, MSFT). Class shares use a dash (BRK-B); the dot form (BRK.B) is also accepted. A listing on another exchange is MIC:TICKER (XPAR:AIR).
endDateNoEnd date in YYYY-MM-DD format (defaults to latest available)
startDateNoStart date in YYYY-MM-DD format (defaults to 6 months ago)
maxResultsNoMaximum number of records to return (default: 60, max: 500); the newest rows are kept and listed newest first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With readOnlyHint=true already covering the safety profile, the description adds real value beyond the annotation: it discloses the unit denomination (USD or the listing's quote unit) and, notably, the warm-up behavior so results don't depend on the range's left edge. This is meaningful context an agent could not get from annotations alone, though it doesn't cover return shape or rate limits.

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?

Four sentences, front-loaded with the definition of ATR, then formula, interpretation, units, and a subtle warm-up caveat. Every sentence contributes; the parenthetical formula is dense but earns its place for an indicator tool.

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 single-indicator computation tool with no output schema, the description supplies computation method, units, and warm-up semantics – enough for an agent to call and interpret it. Return-value format is not described, but a technical-indicator series needs little explanation.

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 100%, so all five parameters are already documented in the schema; the baseline is 3. The warm-up sentence adds interpretive meaning relevant to startDate, but the description otherwise adds little parameter detail beyond what the schema already provides.

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 a specific indicator (ATR), defines it precisely as Wilder's volatility measure, and states what it represents for a stock. An agent can clearly distinguish this from sibling technical indicators like GetBollingerBands or GetStochasticOscillator. It stops short of an explicit sibling comparison, so a 4 rather than a 5.

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?

It gives interpretive context ('higher ATR means wider daily moves') and names use cases ('position sizing and stop placement'), which implies when the tool is relevant. However, it provides no explicit when-to-use/when-not guidance or routing against the numerous sibling indicators, leaving selection to inference.

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