Skip to main content
Glama

Primary Source Commodities

Price History

price.history
Read-onlyIdempotent

Return historical observations for an instrument code (up to 500 points). Use after price.latest when you need a short time series for the same code.

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.history"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesInstrument code from catalog.list. Example: CL, GC, ZC.
limitNoNumber of historical points to return. Max 500, default 60.

Output Schema

NameRequiredDescriptionDefault
dataYesHistorical observations, newest first or as stored
countYesNumber of points returned
series_idYesUnderlying series id
instrumentYesInstrument code

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedOutput schema / properties / data / items / properties / cite
      Added value: +{
      +  "description": "One-line citation for agents",
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / items / properties / pct_change
      Added value: +{
      +  "description": "Percent change vs prior print",
      +  "type": "number"
      +}
    • addedOutput schema / properties / data / items / properties / prior
      Added value: +{
      +  "description": "Previous print value when history exists",
      +  "type": "number"
      +}
    • addedOutput schema / properties / data / items / properties / short_history
      Added value: +{
      +  "description": "Newest-first short history (≤8 points)",
      +  "items": {
      +    "properties": {
      +      "as_of": {
      +        "type": "string"
      +      },
      +      "value": {
      +        "type": "number"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false and non-destructive, so safety behavior is covered. The description adds the 500-point cap and the natural call ordering after price.latest, but says nothing about ordering of returned points, sampling interval, or whether the series can be sparse.

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?

Two sentences, zero filler, with the core behavior front-loaded and the sequencing hint second. Every clause earns its place.

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?

An output schema exists, so return shape needn't be explained, and both parameters are fully documented. The only meaningful gap is the temporal semantics of the series (interval, ordering, earliest/latest anchoring), which an agent calling a "short time series" tool would plausibly want.

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%, with `code` documented and exemplified (CL, GC, ZC) and `limit` bounded (max 500, default 60), so the schema does the work. The description only restates the 500-point ceiling and adds no new meaning about code formats or what `limit` truncates.

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 verb and resource ("Return historical observations for an instrument code") plus a concrete bound (up to 500 points), and explicitly differentiates from the closest sibling, price.latest. An agent can tell this apart from the latest-price tool 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?

"Use after price.latest when you need a short time series for the same code" gives an explicit sequencing rule and a selection condition against a named alternative. It stops short of saying when not to use it (e.g. for a single point or for non-price series), which keeps it out of 5 territory.

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