Skip to main content
Glama

Dados Abertos Senado BR MCP

Execução orçamentária do Senado

senado_execucao_orcamentaria
Read-onlyIdempotent

Execução orçamentária do Senado: despesas (dotação, empenhado, liquidado, pago; desde 2013) ou receitas próprias (previstas e arrecadadas; desde 2012). Para maior/menor/média/mediana/distribuição/ranking ('quanto o Senado pagou/arrecadou com X', 'maior grupo de despesa') use estatisticas=true: SEM agruparPor = distribuição das linhas (min/máx/média/mediana/percentis) + top/bottom; COM agruparPor = grupos ranqueados por soma decrescente (grupos[0]=maior). A coluna de valor analisada é escolhida automaticamente conforme o tipo; o resultado já traz o rótulo legível dela em campoAnalisado. Retorna { tipo, modo, ano, totalLinhas, ... }: nos modos agregados, agregado[] com { chave, ...valores } ordenado por valor; em detalhe, despesas[]/receitas[] limitado por limite (padrão 100, com aviso ao truncar). Use tipo=despesas com modo por-ano/por-acao/por-grupo/por-fonte e tipo=receitas com por-origem; filtre por ano para reduzir o volume antes de pedir detalhe. Única ferramenta de orçamento interno do Senado; não confundir com senado_orcamento_parlamentar (emendas/ofícios parlamentares ao orçamento da União).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anoNoFiltrar por exercício financeiro
modoNoAgregação (por-acao/por-grupo/por-fonte: despesas; por-origem: receitas) ou detalhe. Ignorado quando estatisticas=truepor-ano
tipoNodespesas = dotação e execução; receitas = receitas própriasdespesas
topNNoTamanho do top/bottom nas estatísticas (padrão: 10)
campoNoOpcional: força a coluna de valor analisada; por padrão ela é escolhida conforme o tipo. Se a opção não se aplicar ao tipo, o padrão é usado automaticamente.
limiteNoMáximo de linhas (padrão: 100)
agruparPorNoOpcional: agrupa e ranqueia os resultados por esta dimensão (as opções válidas dependem do tipo).
estatisticasNoDistribuição/ranking sobre as linhas: min/máx/média/mediana/percentis + top/bottom, ou grupos ranqueados por soma via agruparPor

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed2 schema fields changed
    • changedInput schema / properties / agruparPor / description
      Previous value: -"Ranquear grupos por soma do campo (despesas: ano/acao/grupo/fonte/modalidade/resultadoLei/plano; receitas: origem/ano/categoria/especie/natureza)"New value: +"Opcional: agrupa e ranqueia os resultados por esta dimensão (as opções válidas dependem do tipo)."
    • changedInput schema / properties / campo / description
      Previous value: -"Coluna de valor para estatísticas (despesas padrão `pago`; receitas padrão `arrecadada`)"New value: +"Opcional: força a coluna de valor analisada; por padrão ela é escolhida conforme o tipo. Se a opção não se aplicar ao tipo, o padrão é usado automaticamente."
  4. Changed5 schema fields changed
    • addedInput schema / properties / agruparPor
      Added value: +{
      +  "description": "Ranquear grupos por soma do campo (despesas: ano/acao/grupo/fonte/modalidade/resultadoLei/plano; receitas: origem/ano/categoria/especie/natureza)",
      +  "enum": [
      +    "ano",
      +    "acao",
      +    "grupo",
      +    "fonte",
      +    "modalidade",
      +    "resultadoLei",
      +    "plano",
      +    "origem",
      +    "categoria",
      +    "especie",
      +    "natureza"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / campo
      Added value: +{
      +  "description": "Coluna de valor para estatísticas (despesas padrão `pago`; receitas padrão `arrecadada`)",
      +  "enum": [
      +    "pago",
      +    "liquidado",
      +    "empenhado",
      +    "dotacaoInicial",
      +    "dotacaoAtualizada",
      +    "arrecadada",
      +    "prevista"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / estatisticas
      Added value: +{
      +  "default": false,
      +  "description": "Distribuição/ranking sobre as linhas: min/máx/média/mediana/percentis + top/bottom, ou grupos ranqueados por soma via agruparPor",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / modo / description
      Previous value: -"Agregação (por-acao/por-grupo/por-fonte: despesas; por-origem: receitas) ou detalhe"New value: +"Agregação (por-acao/por-grupo/por-fonte: despesas; por-origem: receitas) ou detalhe. Ignorado quando estatisticas=true"
    • addedInput schema / properties / topN
      Added value: +{
      +  "default": 10,
      +  "description": "Tamanho do top/bottom nas estatísticas (padrão: 10)",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  5. Changed2 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +{}
  6. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {},
      +  "type": "object"
      +}
  7. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare the safe, idempotent read profile, but the description goes well beyond them: it discloses the auto-selected value column surfaced as `campoAnalisado`, the returned envelope (`tipo, modo, ano, totalLinhas`, `agregado[]` ordered by value, `despesas[]`/`receitas[]`), and the truncation behaviour (`limite` default 100 with an `aviso` when truncated). These are real runtime behaviours an agent needs and none are in the annotations.

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?

One dense paragraph, but it is front-loaded with the resource definition and the statistics decision rule, and every clause carries operational information. Some content (return envelope fields, type/modo pairing) restates the schema, which is mild redundancy in an otherwise efficient block.

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?

For an 8-parameter, 4-enum tool with an output schema, the description covers what is missing elsewhere: when to prefer statistics vs detail mode, that filtering by `ano` is the volume-control lever, sibling disambiguation, and truncation signalling. Nothing an agent needs to call this correctly is absent.

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 baseline is 3, but the description adds interaction semantics the schema entries only hint at: `modo` is ignored when `estatisticas=true`, `estatisticas` + `agruparPor` produces ranked groups with groups[0] as largest, and `campo` may be overridden and silently falls back to the type default. It stops short of explaining the type-to-modo validity matrix in full, which the schema leaves to the reader.

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

Purpose5/5

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

The opening sentence states a specific resource (Senado budget execution) with the exact measures covered (dotação, empenhado, liquidado, pago / previstas, arrecadadas) and their temporal scope (desde 2013 / 2012). It explicitly positions itself against the closest sibling, `senado_orcamento_parlamentar`, removing ambiguity about which budget tool to pick.

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

Usage Guidelines5/5

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

It gives concrete routing conditions: use `estatisticas=true` for maior/menor/média/mediana/distribuição/ranking, no `agruparPor` = line distribution, with `agruparPor` = ranked groups, and filter by `ano` to shrink volume before requesting `detalhe`. It also names the alternative tool it must not be confused with, which is the rare 'when-not-to-use' clause.

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.