Skip to main content
Glama

bcb_buscar_serie

Search the Brazilian Central Bank's economic time series catalog by name or description using terms with or without accents.

Instructions

Busca séries no catálogo interno por nome ou descrição. Aceita termos com ou sem acentos (ex: 'inflacao' encontra 'Inflação').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termoYesTermo de busca (mínimo 2 caracteres)

Implementation Reference

  • The handler function for 'bcb_buscar_serie' which searches the 'SERIES_POPULARES' catalogue using a normalized search term.
    export async function handleBuscarSerie(
      args: { termo: string }
    ): Promise<ToolResult> {
      try {
        const termoNorm = normalizeString(args.termo);
        const encontradas = SERIES_POPULARES.filter(s =>
          normalizeString(s.nome).includes(termoNorm) ||
          normalizeString(s.categoria).includes(termoNorm)
        );
    
        if (encontradas.length === 0) {
          return {
            content: [{
              type: "text" as const,
              text: JSON.stringify({
                termo: args.termo,
                totalEncontradas: 0,
                mensagem: "Nenhuma série encontrada no catálogo interno. Use o portal SGS do BCB para buscar outras séries: https://www3.bcb.gov.br/sgspub/",
                sugestao: "Tente termos como: selic, ipca, dolar, cambio, pib, inflacao, credito, emprego"
              }, null, 2)
            }]
          };
        }
    
        const result = { termo: args.termo, totalEncontradas: encontradas.length, series: encontradas };
        return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] };
  • The schema definition and registration of the 'bcb_buscar_serie' tool.
      name: "bcb_buscar_serie",
      description: "Busca séries no catálogo interno por nome ou descrição. Aceita termos com ou sem acentos (ex: 'inflacao' encontra 'Inflação').",
      inputSchema: {
        type: "object" as const,
        properties: {
          termo: { type: "string" as const, description: "Termo de busca (mínimo 2 caracteres)" }
        },
        required: ["termo"]
      }
    },
  • src/tools.ts:857-858 (registration)
    Registration in the tool dispatcher where the 'bcb_buscar_serie' tool is routed to 'handleBuscarSerie'.
    case "bcb_buscar_serie":
      return handleBuscarSerie(args as { termo: string });

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