Skip to main content
Glama

TheStrat for agents

resample_bars

Build higher-timeframe bars from smaller bars (US equities session 09:30-16:00 New York; 60-minute bars start at 09:30; extended hours are dropped; a partial first period is dropped). Each bar gets first_side (which prior side it took first) for 3u/3d.

Input Schema

NameRequiredDescriptionDefault
barsYesOHLC bars, oldest first. Each bar is an object {t, o, h, l, c, v?} (also accepts open/high/low/close/time) or a row [t, o, h, l, c, v?]. t = bar START time, ISO 8601 (New York time if no offset). Daily bars may use a date only.
to_timeframeYes60, 30, 15, D, W, M, Q or Y.
from_timeframeNoInput timeframe: 1, 5, 15, 30, 60 or D.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

No annotations, so the description carries the full burden, and it does disclose meaningful behavior: session clipping, extended-hours removal, partial-period dropping, 60-minute anchoring, and the added first_side field. It omits error behavior (invalid target timeframe, unsorted bars) and how OHLCV fields are aggregated.

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?

Two dense sentences, front-loaded with the transformation and followed by the caveats an agent most needs. The trailing '3u/3d' reference is unexplained jargon that costs a little clarity.

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?

With no annotations and no output schema, the description must fully explain input expectations and return shape. It covers input domain and one added output field but not the aggregation semantics of o/h/l/c/v or failure modes, leaving real gaps for a transform tool.

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 coverage is 100%, so all three parameters are already documented in the schema; baseline is 3. The description adds no parameter-level detail (e.g., whether from_timeframe is inferred, what happens with daily input), only an output-side note about first_side.

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?

States a specific verb and resource ('Build higher-timeframe bars from smaller bars') and adds the exact transformation domain (US equities, 60-min alignment). It does not name or contrast any sibling, but no sibling in the list performs resampling, so confusion risk is low.

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

Usage Guidelines4/5

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

The session constraints (09:30-16:00 New York, extended hours dropped, partial first period dropped) implicitly define applicability and exclusions. There is no explicit 'when to use this instead of X' guidance or statement of prerequisites regarding input timeframe.

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