Skip to main content
Glama
derikfernandes

BCB Payment Methods MCP Server

consultar_taxas_intercambio

Query quarterly interchange rates from Brazil's Central Bank payment methods market to analyze transaction costs and market trends.

Instructions

Consulta taxas de intercâmbio praticadas no mercado de meios de pagamento por trimestre.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trimestreYesAno e trimestre no formato YYYYQ (exemplo: '20234')
topNoNúmero máximo de registros a retornar (padrão: 100)
filtroNoFiltro OData para refinar a consulta

Implementation Reference

  • The handler function that executes the 'consultar_taxas_intercambio' tool by fetching interchange rates data from the BCB API using the provided trimester parameter.
    case "consultar_taxas_intercambio": {
      const { trimestre, top = 100, filtro } = args as {
        trimestre: string;
        top?: number;
        filtro?: string;
      };
    
      const data = await fetchBCBData(`TaxasIntercambioDA(trimestre=@trimestre)?@trimestre='${trimestre}'`, {
        formato: "json",
        top,
        filter: filtro,
      });
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • The input schema and metadata definition for the 'consultar_taxas_intercambio' tool, including parameters like trimester, top, and filter.
    {
      name: "consultar_taxas_intercambio",
      description: "Consulta taxas de intercâmbio praticadas no mercado de meios de pagamento por trimestre.",
      inputSchema: {
        type: "object",
        properties: {
          trimestre: {
            type: "string",
            description: "Ano e trimestre no formato YYYYQ (exemplo: '20234')",
          },
          top: {
            type: "number",
            description: "Número máximo de registros a retornar (padrão: 100)",
          },
          filtro: {
            type: "string",
            description: "Filtro OData para refinar a consulta",
          },
        },
        required: ["trimestre"],
      },
    },
  • src/index.ts:263-267 (registration)
    Registration of the tools list for the ListToolsRequestSchema handler, which includes the 'consultar_taxas_intercambio' tool.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools,
      };
    });
  • Duplicate handler for 'consultar_taxas_intercambio' in the HTTP server's MCP CallToolRequestSchema.
    case "consultar_taxas_intercambio": {
      const { trimestre, top = 100, filtro } = args as {
        trimestre: string;
        top?: number;
        filtro?: string;
      };
    
      const data = await fetchBCBData(`TaxasIntercambioDA(trimestre=@trimestre)?@trimestre='${trimestre}'`, {
        formato: "json",
        top,
        filter: filtro,
      });
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • Helper function used by the tool handler to fetch data from the BCB Olinda API.
    async function fetchBCBData(endpoint: string, params: QueryParams = {}) {
      try {
        const url = buildUrl(endpoint, params);
        const response = await axios.get(url, {
          headers: {
            "Accept": "application/json"
          }
        });
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Erro ao consultar API do BCB: ${error.message}`);
        }
        throw error;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a query/consult operation, implying it's read-only, but doesn't explicitly confirm this. It mentions the quarterly scope but doesn't describe what data is returned, potential limitations, authentication requirements, rate limits, or error conditions. For a tool with no annotation coverage, this leaves significant behavioral gaps.

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?

The description is a single, efficient sentence that communicates the core functionality without any wasted words. It's appropriately sized for a query tool and front-loads the essential information. Every word earns its place in defining what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 (3 parameters, 1 required), 100% schema coverage, but no annotations and no output schema, the description is minimally adequate. It states what the tool does but doesn't provide enough context about when to use it, what data it returns, or behavioral characteristics. For a query tool with good schema documentation but no other structured information, this leaves room for improvement.

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 description coverage is 100%, so the schema already documents all three parameters thoroughly. The description mentions 'por trimestre' (by quarter) which aligns with the 'trimestre' parameter, but adds no additional semantic context beyond what's in the schema. With complete schema coverage, the baseline score of 3 is appropriate since the description doesn't need to compensate for schema gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Consulta' - query/consult) and the resource ('taxas de intercâmbio praticadas no mercado de meios de pagamento por trimestre' - exchange rates in the payment methods market by quarter). It distinguishes from siblings by focusing specifically on exchange rates rather than establishments, payment methods, cardholders, discount rates, ATMs, or card transactions. However, it doesn't explicitly contrast with the similarly named 'consultar_taxas_desconto' (consult discount rates).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate versus 'consultar_taxas_desconto' (which deals with discount rates) or 'consultar_meios_pagamento_trimestral' (which deals with payment methods quarterly data). There's no indication of prerequisites, constraints, or typical use cases beyond the basic functionality.

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/derikfernandes/bcb-meios-pagamento-mcp_2'

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