Skip to main content
Glama
SidneyBissoli

Banco Central do Brasil (BCB) — SGS MCP

bcb_deflacionar

Read-onlyIdempotent

Convert nominal Brazilian Central Bank series into real (inflation-adjusted) values using IPCA, INPC, or IGP-M. Ideal for comparing monetary amounts across different periods; returns both nominal and real values with deflation factors.

Instructions

Converte uma série NOMINAL do BCB em valores REAIS (moeda constante), descontando a inflação do período — a diferença entre 'o salário mínimo subiu 46% desde 2020' e 'o salário mínimo subiu 5% em poder de compra'. Quando usar: sempre que valores em reais de épocas diferentes forem comparados. Quando NÃO usar: para séries que já são percentuais, índices ou taxas (deflacionar uma taxa de juros não significa nada); para a série nominal crua use bcb_serie_valores. Índice: ipca (padrão), inpc ou igpm. Base: mesBase no formato yyyy-MM define em reais de que mês os valores são expressos; sem ele, usa o último mês publicado do índice ('em reais de hoje'). Retorna: serie, deflator (índice, código, cobertura), base, periodo, dados (cada ponto com valorNominal, valorReal e fator), variacao (a percentual nominal ao lado da real no mesmo período), derivacao e avisos. Limite da fonte: o SGS não publica número-índice, então o índice é reconstruído compondo as variações mensais — reconstrução conferida contra a própria fonte (diferença máxima de 0,0052 ponto percentual contra o acumulado oficial em 12 meses). Observação fora da cobertura do índice recebe valorReal: null, nunca um valor inventado; como o índice sai com defasagem, o mês corrente costuma cair nesse caso. 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 NOMINAL a deflacionar (ex.: 1619 para salário mínimo)
indiceNoÍndice de preços usado como deflator: IPCA (433), INPC (188) ou IGP-M (189)ipca
mesBaseNoMês em cujos preços os valores serão expressos, no formato yyyy-MM. Sem ele, usa o último mês publicado do índice — isto é, 'em reais de hoje'.
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
dataFinalYesData final (yyyy-MM-dd ou dd/MM/yyyy)
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.
dataInicialYesData inicial (yyyy-MM-dd ou dd/MM/yyyy)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseYesMês em cujos preços os valores reais estão expressos
dadosYesObservações com o valor publicado e o valor em moeda constante
serieYesIdentificação da série nominal
avisosNoRessalvas sobre cobertura do índice ou mês base substituído
periodoYes
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.
deflatorYesÍndice de preços usado e o intervalo que ele cobre
variacaoYesVariação percentual do período em moeda corrente ao lado da variação em moeda constante — é a comparação que a tool existe para entregar. `null` quando há menos de duas observações deflacionadas.
derivacaoYesOrigem dos números calculados: o que é derivado, por qual motor e com quais convenções
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.
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).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed3 schema fields changedv1.9.2
    • addedOutput schema / properties / attribution
      Added value: +{
      +  "description": "URLs canônicas das fontes desta resposta (lista de atribuição)",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / provenance
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Bloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença",
      +  "properties": {
      +    "citation": {
      +      "description": "Citação pronta para uso",
      +      "type": "string"
      +    },
      +    "data_vintage": {
      +      "description": "Competência do dado segundo a fonte; null quando a fonte não expõe",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "license": {
      +      "description": "Regime legal do dado",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "retrieved_at": {
      +      "description": "Instante REAL da extração na origem (ISO-8601, horário de Brasília). Resposta servida de cache mantém o instante do fetch ORIGINAL, que é a data de extração relevante.",
      +      "type": "string"
      +    },
      +    "source": {
      +      "description": "Fonte oficial do dado",
      +      "type": "string"
      +    },
      +    "source_url": {
      +      "description": "URL canônica que reproduz a consulta",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "source",
      +    "source_url",
      +    "data_vintage",
      +    "retrieved_at",
      +    "citation",
      +    "license"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "serie",
      -  "deflator",
      -  "base",
      -  "periodo",
      -  "dados",
      -  "variacao",
      -  "derivacao"
      -]New value: +[
      +  "serie",
      +  "deflator",
      +  "base",
      +  "periodo",
      +  "dados",
      +  "variacao",
      +  "derivacao",
      +  "provenance",
      +  "attribution"
      +]
  2. Addedv1.6.0

TDQS

A5/5.0
Behavior5/5

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

Even with annotations describing readOnlyHint, openWorldHint, and idempotentHint as true, the description adds substantial value: it discloses the API endpoint (SGS), authentication-free usage, rate limits as 'best-effort', retry logic (3 attempts, exponential backoff), error semantics, and the reconstruction limitation with a quantified accuracy (0.0052 pp). This goes far beyond the annotations without contradicting them.

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?

Despite its length, the description is densely informative with no fluff. Each sentence adds essential context: the nominal-vs-real distinction, parameter explanations, error handling, and limitations are all covered without repetition. The structure flows logically from what → when → how → edge cases.

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 complexity of the tool (deflating series, handling frequency aggregation, dealing with index publication lags), the description thoroughly covers all necessary context: what the tool does, how to use it correctly, what the output fields mean, and what to expect in terms of failures and limitations. It also clearly separates the tool from its siblings, making it a complete guide.

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?

Although schema description coverage is 100%, the description enriches parameter understanding: it clarifies that `indice` maps to specific index codes (IPCA=433), the meaning of `mesBase` default, and the semantics of `agregacao` with a crucial caution about not summing monthly variations. This guidance directly prevents misuse even though the schema already lists descriptions.

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 starts with a clear, specific verb+resource: 'Converte uma série NOMINAL do BCB em valores REAIS (moeda constante)'. It distinguishes itself from siblings by explicitly naming alternatives like bcb_serie_valores for the raw nominal series, and provides a concrete real-world example. The distinction from sibling tools (including the when NOT to use case for percentage/index/rate series) is explicit and actionable.

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?

Offers explicit 'Quando usar:' and 'Quando NÃO usar' sections, referencing the sibling bcb_serie_valores for the nominal case. It clearly explains the purpose of each parameter (índice, base, etc.) and provides behavioral nuances like the reconstruction limitation and how dates/out-of-coverage are handled, which directly informs when this tool is appropriate.

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

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