Skip to main content
Glama

resultado_tesouro

Read-onlyIdempotent

Query and filter Brazilian central government fiscal results—revenues, expenses, and primary surplus/deficit—from Tesouro Nacional by period, table, and line.

Instructions

Resultado do Tesouro Nacional (RTN): receitas, despesas e resultado primário do governo central.

Sinal: no RTN, positivo é superávit; é o oposto das NFSP do BCB. Sem período, traz os 12 meses mais recentes. Os principais agregados também estão no catálogo (rtn_*).

Args: inicio, fim: período (AAAA, AAAA-MM ou AAAA-MM-DD). ultimos: períodos recentes. linhas: filtro por texto ("previdenciarios") ou número da linha ("4.3"); separe com ";". tabela: "1.1" resumida (padrão), "1.2" completa, "1.1-A"/"1.2-A" a preços constantes, "1.2-B" acumulado em 12 meses, "2.1"/"2.2" anuais, "2.1-A"/"2.2-A" em % do PIB, "1.3" investimento, "1.4" custeio. nivel: profundidade das linhas sem filtro (1 totais, 2 padrão, 5 tudo). listar: devolve as tabelas e as linhas disponíveis.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "resultado_tesouro"
  }
}

Input Schema

NameRequiredDescriptionDefault
fimNo
nivelNo
inicioNo
linhasNo
listarNo
tabelaNo1.1
ultimosNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the readOnly/idempotent/openWorld annotations, it discloses the sign semantics (positive = superávit, opposite of NFSP), the fallback window when no period is supplied, and the default values for tabela and nivel. These are behavioral facts an agent cannot get from the annotations. It says nothing about output size or truncation when nivel=5, which is the main residual gap.

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?

Front-loaded with the dataset identity and the critical sign caveat before the parameter block. The Args section is a scannable list rather than prose. It is verbose, but every line supplies information missing from a 0%-coverage schema, so little is wasted.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameter-heavy, filter-rich data tool with no output schema and no schema descriptions, the definition covers formats, defaults, table variants, and a discovery mode. The only omission is any hint about the shape or granularity of the returned rows (e.g., whether values are in R$ millions or % of PIB), which would help an agent interpret results.

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

Parameters5/5

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

Schema description coverage is 0% and all seven parameters are undocumented in the schema, so the description carries the entire burden—and it does: date formats (AAAA, AAAA-MM, AAAA-MM-DD), ultimos semantics, the ';'-separated linhas filter accepting text or line numbers, the full tabela vocabulary (1.1, 1.2, 1.1-A, 1.2-B, 2.1, 2.2-A, 1.3, 1.4), the 1–5 nivel scale, and listar as a discovery switch.

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 first line names the specific dataset (Resultado do Tesouro Nacional) and enumerates its contents: receitas, despesas e resultado primário do governo central. It even distinguishes the sign convention from BCB's NFSP series, which prevents confusing the two. A concrete retrieval verb is absent, but the resource and data content are unambiguous.

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

Usage Guidelines4/5

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

The description states default behavior explicitly ('sem período, traz os 12 meses mais recentes') and documents the discovery path via 'listar' (returns available tables and lines) before calling with filters. It also warns about the inverted sign convention versus BCB series, which is a genuine usage trap. It stops short of naming a sibling alternative to use instead, so it is strong context rather than full routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.