Skip to main content
Glama

price_history_lookup

Read-onlyIdempotent

Looks up historical published rates and prices for Tesouro Direto bonds on specific dates.

Accepts a bulk array of queries (up to 50). Each query: productId + referenceDate + exactly one paper identifier (maturityDate, maturityYear, or conversionYear for Renda+/Educa+). Returns official STN data for that date, or found=false.

Use when the user asks for the official published rate or unit price on a specific past date (e.g. "what was the IPCA+ 2035 rate in March 2024?").

Each result has optional investorBuy and investorSell objects with { rate, price }:

  • investorBuy — investor PURCHASE side (STN's Taxa de Compra / PU de Compra). This is the standard quoted rate.

  • investorSell — investor SELL-BACK side (STN's Taxa de Venda / PU de Venda). Normally investorSell.rate > investorBuy.rate.

found: false with unavailableReason: 'awaiting-confirmed-precision' (Selic only) does NOT mean the date has no data: STN published that session in the 2-decimal CSV but not yet in the 4-decimal file this tool requires for Selic. Do not report it to the user as missing — say the confirmed rate is not published yet, and use price_history_series for the same date at CSV precision. A found: false with no unavailableReason means no row matched the requested paper and date — the lookup is keyed by paper, so it cannot tell a market holiday from a paper STN did not offer that day.

Rates are decimal fraction strings (e.g. '0.0737' = 7.37% a.a.) — same convention as simulate_bond and live_quotes_lookup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queriesYesList of point queries (1 to 50). Each query returns one result row or found=false.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint, idempotentHint, and destructiveHint, and the description adds substantial behavioral nuance beyond those: the bulk limit of 50, the meaning of found:false, the Selic 'awaiting-confirmed-precision' caveat, the inability to distinguish holidays from unoffered papers, and the decimal-string rate convention. No contradiction with annotations exists.

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 long but tightly organized into logical paragraphs: purpose, query structure, usage trigger, result semantics, edge-case handling, and rate format. Every sentence carries necessary behavioral or routing information, and the most important scoping information is front-loaded.

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?

Given the tool's complexity, the description is remarkably complete: it covers input composition, result shape at a high level, an important Selic-specific caveat, the meaning of found:false, and cross-tool conventions shared with simulate_bond and live_quotes_lookup. An agent has enough to invoke it correctly and interpret unusual results.

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 the baseline of 3 applies. The description restates the 'exactly one of maturityDate/maturityYear/conversionYear' rule and adds the rate-format convention, but most parameter meaning already lives in the schema; the added value is useful but not transformative.

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?

The description opens with a specific verb-resource pair: 'Looks up historical published rates and prices for Tesouro Direto bonds on specific dates.' It clearly distinguishes itself from the sibling price_history_series by emphasizing point-in-time lookups vs. series data, and later explicitly directs the Selic-precision edge case to that sibling.

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?

The description provides an explicit 'Use when...' statement with a concrete user query example. It also names an alternative tool (price_history_series) and the exact condition under which to switch, which fully supports tool selection.

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