Skip to main content
Glama
alanpcf

brasil-data-mcp

consultar_cambio

Fetch official PTAX exchange rates of foreign currencies to Brazilian Real for a given date. Returns opening, intermediary, and closing quotes with buy and sell rates.

Instructions

Consulta a cotação de câmbio oficial de uma moeda estrangeira em relação ao Real (BRL) numa data, via boletins PTAX do Banco Central (BrasilAPI). Retorna em JSON os boletins do dia (ABERTURA, INTERMEDIÁRIO, FECHAMENTO) com cotação de compra e venda em BRL, paridade e data_hora_cotacao. A fonte NÃO expõe o dia corrente: com data omitida a tool consulta ontem (a cotação mais recente disponível), e em data sem pregão a API retorna os boletins do último dia útil anterior. Use quando o usuário perguntar 'quanto tá o dólar?' (retorna a cotação mais recente, do dia útil anterior), 'cotação do euro em 26/06', 'quanto fechou a libra sexta-feira' — qualquer pergunta sobre valor de moeda estrangeira em reais. NÃO use para: criptomoedas (não está nesta API), BRL (é a moeda base), série histórica (uma data por chamada), ou moedas fora das 10 suportadas — pra descobrir as moedas disponíveis use listar_moedas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoData da cotação no formato YYYY-MM-DD (aceita também DD/MM/YYYY). Se omitida, usa ontem (fuso de Brasília) — a fonte não expõe o dia corrente. Em data sem pregão (fim de semana, feriado) a API retorna as cotações do último dia útil anterior.
moedaYesCódigo da moeda (ISO 4217), case-insensitive. Aceitas: USD, EUR, GBP, JPY, CHF, CAD, AUD, DKK, NOK, SEK. Ex: 'USD'.
Behavior5/5

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

In absence of annotations, description discloses that source does not expose current day, omitted date defaults to yesterday, and non-trading days return last business day; also describes return JSON structure (ABERTURA, INTERMEDIÁRIO, FECHAMENTO with buy/sell rates). No contradictions.

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?

Description is front-loaded with purpose, then covers output, edge cases, usage, exclusions. Every sentence is informative and necessary.

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?

With 2 parameters, 100% schema coverage, no output schema, description fully covers return format, date edge cases, supported currencies, and exclusions. Complete for a single-query currency rate tool.

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?

Schema covers 100% of parameters, but description adds context: date format, default behavior, list of ISO codes, case-insensitivity. Goes beyond schema.

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?

Description clearly states verb 'Consulta', resource 'cotação de câmbio oficial de uma moeda estrangeira em relação ao Real (BRL) numa data', and output format. Differentiates from sibling tools by mentioning listar_moedas for supported currencies.

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?

Explicitly provides use cases (e.g., quanto tá o dólar?) and non-use cases (criptomoedas, BRL, historical series, unsupported currencies). Also directs to listar_moedas for discovering available currencies.

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/alanpcf/brasil-data-mcp'

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