Skip to main content
Glama

Query Government Central revenue, expenditure, and result

get_tesouro_rtn
Read-onlyIdempotent

Retrieve monthly current-value RTN accounts from 1997 onward. Defaults to total revenue, transfers, net revenue, total expenditure, and the above-the-line primary result; select exact account IDs or search account labels for detail.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoInclusive last month, YYYY-MM.
fromNoInclusive first month, YYYY-MM.
limitNoMaximum account rows to return.
queryNoAccount-label search; omit accounts to search the full tree.
accountsNoExact account IDs returned by get_tesouro_rtn_schema.
dataset_idYesThe official Tesouro Nacional RTN dataset identifier.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesSource-preserving data or schema payload for the selected official dataset.
metaYesResponse metadata and source provenance.
linksNoRelated API links.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / dataset_id / description
      Added value: +"The official Tesouro Nacional RTN dataset identifier."
    • addedInput schema / properties / from / description
      Added value: +"Inclusive first month, YYYY-MM."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum account rows to return."
    • addedInput schema / properties / to / description
      Added value: +"Inclusive last month, YYYY-MM."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "description": "REST-aligned Open Economics response with data, metadata, links, and source provenance.",
      +  "properties": {
      +    "data": {
      +      "description": "Source-preserving data or schema payload for the selected official dataset."
      +    },
      +    "links": {
      +      "additionalProperties": {},
      +      "description": "Related API links.",
      +      "properties": {
      +        "observations": {
      +          "description": "Canonical observations endpoint for this dataset.",
      +          "type": "string"
      +        },
      +        "self": {
      +          "description": "Canonical URL for this response.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "meta": {
      +      "additionalProperties": {},
      +      "description": "Response metadata and source provenance.",
      +      "properties": {
      +        "dataset": {
      +          "description": "Open Economics dataset identity when supplied."
      +        },
      +        "provenance": {
      +          "description": "Upstream source URLs, versions, timestamps, and methodology details."
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "data",
      +    "meta"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world. The description adds real behavioral context on top: values are monthly and current-value (nominal, not deflated), coverage starts in 1997, and the default account set is a specific fixed list. These details materially affect how results should be interpreted.

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?

Two dense sentences with no filler. The default-result behavior is front-loaded, followed by the two selection mechanisms — exactly the order an agent needs to decide whether to pass parameters at all.

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?

An output schema exists, so return values need no explanation, and full schema description coverage handles parameter mechanics. The description supplies the remaining interpretive context (time coverage, nominal values, default aggregate set) needed to call the tool correctly.

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 coverage is 100%, so the schema already documents every parameter and a 3 is the floor. The description adds meaning the schema does not: the default response is the five named aggregates, 'query' searches account labels, and 'accounts' takes exact IDs sourced from the schema tool. That is genuine value beyond the structured fields.

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?

States a specific verb and resource ('Retrieve monthly current-value RTN accounts') and pins the scope with 'from 1997 onward'. The title adds the domain (government central revenue/expenditure), so the agent knows exactly what data set this returns, though it never explicitly names the sibling get_tesouro_rtn_schema as its companion beyond an oblique 'account IDs returned by get_tesouro_rtn_schema' reference in the schema.

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?

Explains default behavior (returns the five headline aggregates) and the two ways to get detail — select exact account IDs or search labels. This gives an agent clear routing for the common 'default vs. drill-down' decision. It stops short of explicit when-not guidance or naming an alternative tool for other use cases.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.