Skip to main content
Glama

get_bars

Retrieve daily-bar summary statistics with a required as-of date to prevent lookahead bias in backtests. Get per-symbol aggregates and resource links without raw rows inlined.

Instructions

Summary statistics for daily bars over a window. Returns per-symbol aggregates and a resource link to the full frame; raw rows are never inlined. Examples: get_bars(symbols=['SYN-04'], start='2019-01-01', end='2021-12-31', as_of='2021-12-31'); get_bars(symbols=['SYN-02','SYN-09'], start='2020-01-01', end='2020-12-31', as_of='2020-12-31', fields=['close','volume']). as_of is required on this tool and the call fails without it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYesLast bar date, inclusive.
as_ofYesREQUIRED point-in-time cutoff. There is no default and no safe guess. No bar dated after this is returned, ever. Set it to the decision date you are simulating, not to today: using a later as_of than the evaluation window is how a backtest accidentally sees the future.
startYesFirst bar date, inclusive.
fieldsNoWhich OHLCV fields the summary should cover.
symbolsYesOne to twenty dataset symbols.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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?

Without annotations, the description carries the full burden of behavioral disclosure. It discloses key behaviors: raw rows are never inlined, per-symbol aggregates are returned along with a resource link, and as_of is mandatory. It also implies idempotence (a read operation) implicitly. These go beyond the schema's parameter descriptions, providing useful operational context.

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?

The description is compact and well-structured. It states the purpose, output format, and a critical constraint in two sentences, followed by two illustrative examples that are directly reusable. Every sentence adds value, and the critical as_of requirement is front-loaded. No extraneous information.

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?

Given the tool has 5 parameters, an output schema, and full schema coverage, the description is largely complete. It explains the output shape (aggregates and a link, no raw rows) and the as_of requirement. Minor omissions include explicit mention of default behavior for 'fields' (though schema covers it) or any mention of error conditions, but these are covered by the schema and output schema, so the description is sufficiently rich.

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%, and each parameter already has detailed descriptions in the schema (e.g., as_of's point-in-time semantics, symbols range, fields enum). The description adds examples to illustrate parameter combinations but does not add new semantic meaning beyond what the schema already provides. Thus, the baseline of 3 applies.

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 clearly states the tool's purpose: 'Summary statistics for daily bars over a window,' which is a specific verb+resource. It also clarifies the output: 'Returns per-symbol aggregates and a resource link to the full frame; raw rows are never inlined.' However, it does not explicitly differentiate from sibling tools like get_news or describe_series, so it doesn't fully separate itself from alternatives.

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 provides examples of valid calls and highlights a critical constraint ('as_of is required and the call fails without it'). It does not explicitly state when to use this tool versus alternatives (e.g., 'use this instead of describe_series when you need summaries'), so the context of usage is implied rather than explicit.

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