Skip to main content
Glama

bcb_comparar

Read-onlyIdempotent

Compare 2 to 5 Brazilian economic time series over the same period, sorting them by percent change to highlight best and worst performers.

Instructions

Compara de 2 a 5 séries temporais no MESMO período (dataInicial e dataFinal obrigatórias), calculando a variação percentual de cada uma e ordenando-as num ranking (maior para menor variação). Quando usar: para comparar/correlacionar a evolução de vários indicadores lado a lado. Quando NÃO usar: para uma única série use bcb_variacao. Retorna: periodo, totalSeries, seriesComDados, seriesComErro, ranking (cada item com posicao, codigo, nome, valorInicial, valorFinal, variacaoPercentual, maximo, minimo, media) e erros. Resiliente: séries sem dados no período são isoladas em erros sem invalidar a comparação. 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
codigosYesArray com 2 a 5 códigos de séries para comparar
dataInicialYesData inicial (yyyy-MM-dd ou dd/MM/yyyy)
dataFinalYesData final (yyyy-MM-dd ou dd/MM/yyyy)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodoYesJanela temporal comparada
totalSeriesYesQuantidade de séries solicitadas
seriesComDadosYesQuantidade de séries com dados no período
seriesComErroYesQuantidade de séries sem dados ou com erro
rankingYesSéries ordenadas pela variação percentual (maior para menor)
errosYesSéries que não retornaram dados, com o motivo
Behavior5/5

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

Beyond annotations, the description discloses public API without auth, best-effort usage, retry logic with 3 attempts and exponential backoff, error handling for HTTP 404, and return format details. 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 well-structured with front-loaded purpose, usage guidance, return fields, resilience, and behavior. Slightly verbose but each section adds value.

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 output schema exists, the description covers return fields, error handling, retry logic, authentication, and date format. No obvious gaps for an agent to use the tool correctly.

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

Parameters3/5

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

Schema coverage is 100% with good descriptions. The description adds minimal extra meaning (e.g., same period constraint) but not enough to significantly exceed the baseline of 3.

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 compares 2 to 5 time series over the same period, calculates percent variation, and ranks them. It uses specific verbs and resource, and explicitly distinguishes from sibling bcb_variacao.

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 provides explicit 'Quando usar' and 'Quando NÃO usar' sections, naming an alternative tool for single series (bcb_variacao) and giving context for comparing multiple indicators.

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