Skip to main content
Glama

On-Balance Volume (OBV)

GetOnBalanceVolume
Read-only

Calculate a stock's On-Balance Volume (OBV) to track cumulative volume flow and confirm or spot divergences from price trends.

Instructions

On-Balance Volume (OBV) for a stock. Running cumulative volume that adds the bar's volume on up-closes, subtracts on down-closes, and stays flat on equal closes. Useful for confirming or diverging from price trends with volume flow. OBV is anchored at 0 on the first bar of the requested range, so absolute values shift with startDate and are not comparable across calls - read the slope and divergences, not the level.

Input Schema

NameRequiredDescriptionDefault
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

A4.2/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true, but the description goes further with a real behavioral caveat: OBV is anchored at 0 on the first requested bar and absolute levels are not comparable across calls. That 'read the slope, not the level' warning is non-obvious operational context an agent would otherwise get wrong.

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?

Three tight sentences, front-loaded with the definition and followed by usage and the critical caveat; there is no filler and the most decision-relevant warning is placed last for emphasis without burying the core meaning.

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 read-only, no-output-schema indicator tool the description covers what it computes, how to interpret the series, and the cross-call comparability pitfall. It stops short of noting anything about series length or pagination behavior, but nothing essential for a correct call is missing.

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 100% so parameter definitions carry the baseline, but the description adds genuine semantic weight by tying startDate to a data-interpretation consequence (the anchor point shifting absolute values between calls) that the schema itself does not state.

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 gives a specific resource (On-Balance Volume for a stock) plus the exact computation rule (add volume on up-closes, subtract on down-closes, flat on equal closes), which makes it clearly distinguishable from the other technical-indicator siblings like GetStochasticOscillator or GetBollingerBands.

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 states the analytic use case ('confirming or diverging from price trends with volume flow') but offers no explicit when-to-use/when-not guidance and never names an alternative indicator or the conditions that would select one.

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