Skip to main content
Glama

Primary Source Commodities

Price Statistics

price.stats
Read-onlyIdempotent

Realized volatility, change over window, and range for an instrument, computed over its stored history. Use this for 'how volatile is X' and 'how has X moved over the last year' — it answers both in one call, so prefer it over fetching price.history and computing yourself. Descriptive only: no signals or view, which live in decision.get.

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": {
      "code": "<code>"
    },
    "name": "price.stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesInstrument code from catalog.list. Example: CC, CL, GC.
windowsNoWindows to compute over, as a count and a unit. Example: ["30d", "90d", "1y"]. Defaults to those three.

Output Schema

NameRequiredDescriptionDefault
unitNoUnit of the underlying price
as_ofNoEconomic date of the newest observation used
rangeYesMin, max and mean over the retained history
changeYesChange across each window, both endpoints dated
series_idYesUnderlying series id
instrumentYesInstrument code
volatilityYesAnnualized realized volatility per window
license_tagNoLicence the derived figures may claim
input_seriesYesThe window these figures were computed over. Dereference via price.history for the observations themselves.
periods_per_yearNoObservations per year implied by the series cadence; null when the cadence makes no promise and nothing can be annualized

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, closed-world, non-destructive behavior, so the safety bar is satisfied. The description adds real value beyond them: the metrics are derived from stored history, multiple metrics come back in a single call, and the tool is deliberately non-prescriptive. It says nothing about how much history is required or what happens for short/incomplete series, which is the main remaining gap.

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 sentences, no filler: what it computes first, when to use it second, what it is not third. The routing information is front-loaded before the caveat.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 values need no explanation, and the description covers purpose, alternatives, and scope boundaries. Nothing an agent needs in order to choose and invoke this tool correctly is missing.

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 both parameters carry format examples ('30d, 90d, 1y') and default values in the schema itself. The description only implies window-based computation ('change over window', 'over the last year') without adding constraints, so it sits at the baseline for a fully documented schema.

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 specific computable outputs (realized volatility, change over window, range) for a specific resource (an instrument, over its stored history). An agent can distinguish it immediately from price.history (raw series) and decision.get (signals/views).

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

Usage Guidelines5/5

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

Gives concrete triggering questions ('how volatile is X', 'how has X moved over the last year') and explicitly names the alternative to avoid, price.history, with the reason (answers both in one call). It also states the exclusion: signals and views live in decision.get.

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