Skip to main content
Glama
SidneyBissoli

Banco Central do Brasil (BCB) — SGS MCP

bcb_serie_valores

Read-onlyIdempotent

Fetch historical values for a Brazilian Central Bank time series by SGS code, with optional date range filtering, automatic chunking for long periods, and frequency resampling.

Instructions

Consulta o histórico de valores de UMA série temporal do BCB pelo código SGS, opcionalmente limitado por um intervalo de datas (dataInicial/dataFinal). Quando usar: para obter a série histórica completa ou uma janela de datas específica. Quando NÃO usar: para apenas os pontos mais recentes use bcb_serie_ultimos; para a variação percentual use bcb_variacao; para comparar várias séries use bcb_comparar; se não souber o código, descubra-o antes com bcb_buscar_serie ou bcb_series_populares. Retorna: objeto serie (codigo, nome, categoria, periodicidade), totalRegistros, periodoInicial, periodoFinal e dados (array de {data, valor}); quando não há dados, totalRegistros = 0 e uma observacao explicativa. Períodos longos: a API do BCB limita séries DIÁRIAS a 10 anos por consulta e recusa janela aberta (HTTP 406). Isso é tratado automaticamente — a janela é fatiada em requisições de até 3 anos e o resultado vem fundido e ordenado, com chunking na resposta dizendo quantas janelas foram usadas; se o período pedido estava aberto numa série diária, janelaAplicada diz qual janela foi usada e por quê. Harmonização: frequencia (mensal|trimestral|anual) reamostra a série antes de responder, com a convenção escolhida em agregacao; a resposta traz harmonizacao com derived: true e a nota do cálculo. 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 (ex: 433 para IPCA mensal, 11 para Selic)
agregacaoNoComo agregar os valores de cada período quando `frequencia` é informada. `ultimo` (padrão) serve a nível de preço, taxa e índice; `soma` a fluxo; `acumulada` a séries que JÁ SÃO variação percentual (IPCA mensal, por exemplo), compondo geometricamente — somar 12 variações mensais NÃO dá a inflação do ano.ultimo
dataFinalNoData final no formato yyyy-MM-dd ou dd/MM/yyyy (opcional)
frequenciaNoOpcional: reamostra a série para esta frequência antes de responder (só agrega para períodos MAIORES; pedir frequência mais fina que a da série é recusado). Útil para comparar séries de periodicidades diferentes.
dataInicialNoData inicial no formato yyyy-MM-dd ou dd/MM/yyyy (opcional)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dadosYesObservações históricas
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)
harmonizacaoNoPresente quando `frequencia` foi informada: descreve a reamostragem aplicada. Valor DERIVADO — calculado por este servidor, não publicado pelo Banco Central.
periodoFinalNoData da última observação
janelaAplicadaNoPresente quando o período pedido estava aberto numa série diária e o servidor aplicou uma janela própria (a origem recusa janela aberta em série diária com HTTP 406).
periodoInicialNoData da primeira observação
totalRegistrosYesQuantidade de observações retornadas
Behavior4/5

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

The annotations already declare readOnlyHint: true, openWorldHint: true, idempotentHint: true, and destructiveHint: false, so the safety profile is well covered. The description adds substantial behavioral context: daily series capped at 10 years with automatic chunking, open-window refusal handling (HTTP 406), harmonic resampling behavior, public API without auth, automatic retry (3 attempts, exponential backoff), error handling (HTTP 404), and both text and structuredContent output. This adds context beyond annotations, though it doesn't describe the exact response schema (which the output schema covers). No contradiction with 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?

The description is long but tightly organized with clear sections (Quando usar, Quando NÃO usar, Retorna, Períodos longos, Harmonização, Comportamento). Every section provides unique value; the list of alternatives is essential for tool selection. However, it is quite dense and could potentially be trimmed, though the complexity of the tool (chunking, harmonization, error handling) justifies most length. One point off for being slightly verbose in the chunking section.

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 tool with 5 parameters, 2 enums, an output schema, and rich annotations, the description covers all critical operational aspects: input validation (date formats, aggregation conventions), edge cases (open windows, long periods, HTTP 406), error handling (retry, 404), harmonization behavior, and output structure. The output schema handles return value specifics, so the description doesn't need to duplicate that. It is complete for the complexity level.

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

Parameters5/5

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

Even though the input schema has 100% description coverage, the description adds significant semantic value: it explains the chunking logic triggered by long date ranges (which is a behavioral consequence of dataInicial/dataFinal), defines the date format (dd/MM/yyyy and yyyy-MM-dd), and elaborates on the `agregacao` parameter by explaining the difference between `soma` and `acumulada` for inflation series — a critical nuance not in the schema. The description clarifies that `frequencia` only aggregates to larger periods and refuses finer frequencies, which complements the schema. It also explains the return structure (serie, totalRegistros, etc.) which helps parameter understanding.

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: 'Consulta o histórico de valores de UMA série temporal do BCB pelo código SGS' — clearly stating the action (query), the resource (historical values of a time series), and the key identifier (SGS code). It explicitly distinguishes from siblings by naming five alternative tools and their specific uses, which fully differentiates this tool from its siblings.

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 includes an explicit 'Quando usar' and 'Quando NÃO usar' section that names five specific alternative tools (bcb_serie_ultimos, bcb_variacao, bcb_comparar, bcb_buscar_serie, bcb_series_populares) and the exact scenarios where each is more appropriate, along with a prerequisite (finding the code first). This is explicit, actionable guidance with clear exclusions and alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SidneyBissoli/bcb-br-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server