Skip to main content
Glama

bcb_variacao

Read-onlyIdempotent

Calculate the percent change and descriptive statistics of a single economic time series from the Brazilian Central Bank over a defined period.

Instructions

Calcula a variação percentual de UMA série entre o primeiro e o último ponto do período, mais estatísticas descritivas. O período pode ser definido por datas (dataInicial/dataFinal) OU pelos últimos N períodos (parâmetro periodos, que tem precedência e ignora as datas). Quando usar: para medir tendência/variação de uma única série. Quando NÃO usar: para comparar várias séries use bcb_comparar; para os valores brutos use bcb_serie_valores. Requer ao menos 2 observações no período (senão retorna isError). Retorna: serie, periodo (dataInicial, dataFinal, totalPeriodos), analise (valorInicial, valorFinal, diferencaAbsoluta, variacaoPercentual, variacaoFormatada) e estatisticas (maximo, minimo, media, amplitude). 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
dataInicialNoData inicial (yyyy-MM-dd ou dd/MM/yyyy). Se não informada, usa o primeiro valor disponível.
dataFinalNoData final (yyyy-MM-dd ou dd/MM/yyyy). Se não informada, usa o último valor disponível.
periodosNoAlternativa: calcular variação dos últimos N períodos (ignora datas se informado)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
serieYesIdentificação da série
periodoYesJanela temporal analisada
analiseYesResultado da variação entre o primeiro e o último valor
estatisticasYesEstatísticas descritivas dos valores no período
Behavior5/5

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

Beyond annotations (readOnlyHint, etc.), the description adds significant behavioral details: no authentication required, best-effort usage, automatic retries with exponential backoff (up to 3 attempts), error handling with Portuguese messages, and interpretation of HTTP 404. This fully compensates for any gaps. 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 thorough but slightly verbose. It is well-structured with clear sections, though some sentences could be combined. Front-loaded with the main purpose, it earns its length by covering multiple aspects without redundancy.

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 (4 parameters, output schema present), the description is fully complete. It covers return structure, error scenarios, retry logic, authentication, and period handling. The output schema handles return types, so no need to repeat.

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?

With 100% schema description coverage, the description still adds value by explaining the precedence of 'periodos' over dates and the requirement of at least 2 observations. This clarifies parameter interaction beyond the schema's individual 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 clearly states it calculates percentage variation and descriptive statistics for a single series, with precise period definition (dates or last N periods). It distinguishes from sibling tools bcb_comparar (multiple series) and bcb_serie_valores (raw values), making the purpose unambiguous.

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' and 'Quando NÃO usar' sections provide clear guidance on appropriate contexts, directly naming alternatives (bcb_comparar, bcb_serie_valores) and specifying when not to use this tool.

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