Skip to main content
Glama
SidneyBissoli

Banco Central do Brasil (BCB) — SGS MCP

bcb_serie_ultimos

Read-onlyIdempotent

Fetch the most recent N values of any BCB economic time series without specifying dates. Ideal for getting the latest data points like the last 12 months of IPCA.

Instructions

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
Behavior5/5

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

Even with annotations declaring readOnlyHint/idempotentHint/destructiveHint false, the description adds substantial behavioral context: automatic retries with exponential backoff, the N > 20 native API limitation and workaround, HTTP 404 semantics, Portuguese error messages, JSON/structuredContent behavior, and output date/number formats. 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 well organized into semantic sections: what returns, when to use, when not to use, limits, behavior, errors, and output format. It contains minor redundancy with the schema's parameter descriptions, but no wasted sentences overall, and the most important purpose is front-loaded first.

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 moderate complexity, the description covers all key operational aspects: output shape, no-auth backend API, retry behavior, error semantics, native AGI constraints, and output formatting. With both an output schema and a very complete description, an AI agent has sufficient context to invoke the tool correctal

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 covers both parameters at 100%, including the 1-1000 range and default for quantidade. The description adds value by explaining that N > 20 triggers the system's date-window search behavior, which directly informs an agent how the quantidade parameter actually behaves in practice.

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 clearly states the tool's function: retrieving the last N observations of a single BCB time series, most recent first. It distinguishes itself from the sibling tool bcb_serie_valores by explicitly positioning this as the choice for recent data without date calculation.

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' section with a concrete IPCA example and an explicit 'Quando NÃO usar' section that names bcb_serie_valores as the alternative for date ranges or full history. This gives an agent clear decision criteria.

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