Skip to main content
Glama

Bollinger Bands

GetBollingerBands
Read-only

Calculate Bollinger Bands for a stock to gauge volatility and overbought or oversold conditions. Returns middle, upper and lower bands plus %B and bandwidth columns.

Instructions

Bollinger Bands for a stock. A middle band (simple moving average of close) with upper and lower bands set a number of standard deviations above and below it. Bands widen when volatility rises and contract when it falls; price touching the upper/lower band is a common overbought/oversold cue. Includes %B ((close-lower)/(upper-lower)) and bandwidth ((upper-lower)/middle) columns. The moving-average window is warmed up on price history fetched before startDate, so values do not depend on the requested range's left edge.

Input Schema

NameRequiredDescriptionDefault
periodNoMoving-average window (default: 20)
stdDevNoStandard deviations for the upper/lower bands (default: 2)
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.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description additionally discloses that the moving-average window is warmed up on price history before startDate, which prevents an important misinterpretation of values near the left edge of the requested range.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, each contributing distinct information: definition, interpretation, extra columns, and warm-up behavior. It is front-loaded and free of redundant filler.

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 an indicator tool with no output schema, the description explains the returned conceptual columns (%B, bandwidth) and the warm-up behavior. It is nearly complete, though it could mention tool-selection context for a fully complete definition.

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 six parameters are already documented in the schema. The description adds context about the warm-up behavior affecting period/startDate, but does not add syntax or format details beyond the schema baseline.

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?

The description names the specific indicator and defines its components (middle band, upper/lower bands, %B, bandwidth). This is concrete enough for an agent to distinguish it from sibling indicator tools such as GetStochasticOscillator or GetAverageTrueRange.

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?

It explains what the indicator means (overbought/oversold cue when price touches a band), but gives no guidance on when to choose this tool over alternatives, no exclusions, and no prerequisites for use.

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