Skip to main content
Glama

Primary Source Commodities

Statistics for Several Instruments

stats.bundle
Read-onlyIdempotent

Volatility, change and range for up to 20 instruments in ONE call. A separate tool from price.stats, for the same pricing reason as price.bundle. Returns the same derived statistics over the full retained history per instrument, with per-instrument errors rather than a whole-call failure when one has no history. Paid; charged only if at least one instrument resolves.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "codes": "<codes>"
    },
    "name": "stats.bundle"
  }
}

Input Schema

NameRequiredDescriptionDefault
codesYesInstrument codes, up to 20.
windowsNoLookback windows, e.g. ["30d", "90d", "1y"]. Defaults to those three.

Output Schema

NameRequiredDescriptionDefault
countYes
statsYes
dropped_codesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (which already declare a safe, idempotent read), the description discloses three non-obvious traits: statistics span the full retained history per instrument, failures are per-instrument rather than whole-call, and the call is paid but only charged if at least one instrument resolves. The partial-failure and billing semantics are exactly the kind of context annotations cannot carry.

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 short sentences with the batch scope front-loaded, followed by differentiation, then error and billing semantics. No filler; every clause carries information an agent needs before invoking.

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?

With an output schema present, return shape need not be explained, and the description covers scope, failure behavior, and cost. The one residual gap is the opaque pointer to price.bundle's pricing rationale, which leaves the cost model partly implicit for an agent without that sibling's description loaded.

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 both codes and windows are already documented in the schema, including the 20-item cap and the default window set. The description only restates the 20-instrument limit and adds the notion that the stat horizon is the full retained history; it adds no new syntax or format detail for windows.

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?

States a specific set of derived statistics (volatility, change, range) over a specific resource (up to 20 instruments in one call) and explicitly positions itself against price.stats. An agent can tell it apart from the single-instrument sibling without opening either schema.

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 'up to 20 instruments in ONE call' framing and the explicit contrast with price.stats make the batch-use case clear. However, the rationale for choosing it over price.bundle is deferred to a cross-reference ('for the same pricing reason as price.bundle') rather than stated, so the selection logic requires prior knowledge of a sibling.

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