Skip to main content
Glama

Banco Central do Brasil (BCB) — SGS Time Series MCP Server

Últimos valores da série

bcb_serie_ultimos
Read-onlyIdempotent

Obtém as últimas N observações de UMA série temporal do BCB (mais recentes primeiro a partir do fim da série). Quando usar: para ver os dados mais recentes sem precisar calcular datas (ex.: últimos 12 meses do IPCA). Quantidade entre 1 e 1000 (padrão 10). Quando NÃO usar: para um intervalo de datas ou o histórico completo use bcb_serie_valores. Retorna: objeto serie, totalRegistros e dados (array de {data, valor}); sem dados, totalRegistros = 0 com observacao. Acima de 20: o endpoint nativo do BCB rejeita N > 20 em qualquer periodicidade, então o servidor descobre a periodicidade da série e busca por janela de datas, devolvendo os N últimos pontos. Comportamento: consome a API pública SGS do Banco Central do Brasil — sem autenticação, chave de API ou cadastro, e sem limite de requisições divulgado (uso é best-effort). Em falha transitória ou timeout a chamada é repetida automaticamente (até 3 tentativas, backoff exponencial); persistindo o erro, retorna isError: true com mensagem em português (HTTP 404 = série inexistente ou sem dados no período solicitado). O resultado vem como JSON tanto em texto quanto em structuredContent (conforme o outputSchema); datas no formato dd/MM/yyyy e valores numéricos (ponto decimal).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codigoYesCódigo da série no SGS/BCB
quantidadeNoQuantidade de valores a retornar (1-1000, padrão: 10). A API do BCB tem teto de 20 no endpoint nativo; acima disso o servidor busca por janela de datas e devolve os N últimos.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dadosYesObservações mais recentes
serieYesIdentificação da série temporal
chunkingNoPresente quando a consulta foi fatiada em várias requisições à origem, por causa do limite de 10 anos por janela em séries diárias. As fatias são fundidas e ordenadas antes de responder.
observacaoNoMensagem informativa (ex.: quando não há dados)
provenanceYesBloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença
attributionYesURLs canônicas das fontes desta resposta (lista de atribuição)
totalRegistrosYesQuantidade de observações retornadas

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial behavior beyond that: no authentication needed, best-effort API usage, automatic retries with backoff, error payload shape, HTTP 404 semantics, the N>20 workaround, and date/value formatting. There is no contradiction with the annotations.

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?

Long but well-structured with labeled sections and a front-loaded purpose. Every sentence is substantive, though some parameter constraints and the N>20 detail repeat the input schema, and the output schema already covers return structure, so it is slightly less tight than ideal.

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?

For a read-only retrieval tool, it covers purpose, when to use and not use it, return shape, date format, error handling, retry/backoff behavior, authentication requirements, and the N>20 edge case. No critical operational detail an agent would need is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents both parameters at 100% coverage, so the baseline is 3. The description adds meaning by framing 'quantidade' in terms of 'mais recentes primeiro a partir do fim da série' and reinforcing the N>20 workaround and default of 10, which helps an agent choose the correct quantity.

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: 'Obtém as últimas N observações de UMA série temporal do BCB' and clarifies ordering ('mais recentes primeiro'). The 'Quando NÃO usar' section distinguishes it from bcb_serie_valores by scope, preventing confusion with sibling tools.

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?

Explicit 'Quando usar' section with a concrete example (últimos 12 meses do IPCA) and a 'Quando NÃO usar' section naming bcb_serie_valores for date ranges or full history. This gives the agent a clear routing rule with no need to infer.

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.