Skip to main content
Glama

bcb_serie_metadados

Retrieve metadata for Brazilian Central Bank economic time series, including name, frequency, category, and details, by entering the series code.

Instructions

Obtém informações/metadados de uma série temporal do BCB. Retorna nome, periodicidade, categoria e outros detalhes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codigoYesCódigo da série no SGS/BCB

Implementation Reference

  • The handler function 'handleSerieMetadados' fetches and formats metadata for a given BCB series code.
    export async function handleSerieMetadados(
      args: { codigo: number },
      timeoutMs?: number,
      maxRetries?: number
    ): Promise<ToolResult> {
      try {
        const metadataUrl = `https://api.bcb.gov.br/dados/serie/bcdata.sgs.${args.codigo}/metadados?formato=json`;
    
        try {
          const metadata = await fetchBcbApi(metadataUrl, timeoutMs, maxRetries) as SerieMetadados;
          const serieInfo = SERIES_POPULARES.find(s => s.codigo === args.codigo);
    
          const result = {
            codigo: metadata.codigo || args.codigo,
            nome: metadata.nome || serieInfo?.nome || `Série ${args.codigo}`,
            unidade: metadata.unidade || "Não informada",
            periodicidade: metadata.periodicidade || serieInfo?.periodicidade || "Não informada",
            fonte: metadata.fonte || "Banco Central do Brasil",
            categoria: serieInfo?.categoria || "Não categorizada",
            especial: metadata.especial || false,
            urlConsulta: `${BCB_API_BASE}.${args.codigo}/dados?formato=json`,
            urlUltimos10: `${BCB_API_BASE}.${args.codigo}/dados/ultimos/10?formato=json`
          };
    
          return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] };
        } catch {
          const serieInfo = SERIES_POPULARES.find(s => s.codigo === args.codigo);
    
          if (serieInfo) {
            const result = {
              codigo: args.codigo,
              nome: serieInfo.nome,
              periodicidade: serieInfo.periodicidade,
              categoria: serieInfo.categoria,
              fonte: "Banco Central do Brasil",
  • The schema definition for the 'bcb_serie_metadados' tool in the tool registration array.
    {
      name: "bcb_serie_metadados",
      description: "Obtém informações/metadados de uma série temporal do BCB. Retorna nome, periodicidade, categoria e outros detalhes.",
      inputSchema: {
        type: "object" as const,
        properties: {
          codigo: { type: "number" as const, description: "Código da série no SGS/BCB" }
        },
        required: ["codigo"]
      }
    },
  • src/tools.ts:853-854 (registration)
    The registration of 'bcb_serie_metadados' within the 'dispatchTool' dispatcher.
    case "bcb_serie_metadados":
      return handleSerieMetadados(args as { codigo: number }, timeoutMs, maxRetries);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves metadata (a read operation) and lists example return fields, but doesn't cover important aspects like authentication needs, rate limits, error handling, or whether it's idempotent. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 concise and front-loaded, stating the core purpose in the first clause. The second clause adds useful detail about return values. Both sentences earn their place by providing essential information without redundancy. However, it could be slightly more structured by explicitly separating purpose from output details.

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 simplicity (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and output examples, but lacks context on usage relative to siblings, behavioral details, or error cases. For a read-only metadata tool, this is passable but leaves room for improvement in guiding the agent effectively.

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?

The description doesn't add any parameter-specific information beyond what the schema provides. The schema has 100% description coverage for the single parameter 'codigo', clearly documenting it as 'Código da série no SGS/BCB' (Series code in SGS/BCB). With high schema coverage, the baseline score is 3, as the description doesn't compensate but also doesn't detract.

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 tool's purpose: 'Obtém informações/metadados de uma série temporal do BCB' (Gets information/metadata of a BCB time series). It specifies the verb 'obtém' (gets) and resource 'série temporal do BCB' (BCB time series), and lists examples of returned data like name, periodicity, and category. However, it doesn't explicitly differentiate from sibling tools like 'bcb_buscar_serie' (which might search for series) or 'bcb_serie_valores' (which likely gets actual values).

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 sibling tools like 'bcb_buscar_serie' for searching series or 'bcb_serie_valores' for getting values, nor does it specify prerequisites or contexts for use. The agent must infer usage from the tool name and description alone.

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