Skip to main content
Glama

Dados Abertos Senado BR MCP

Gastos CEAPS (cota parlamentar)

senado_ceaps
Read-onlyIdempotent

Despesas da Cota para Exercício da Atividade Parlamentar (CEAPS) dos senadores em um ano. Para perguntas de maior/menor/média/mediana/distribuição/ranking ('quem gastou mais CEAPS', 'gasto mediano', 'distribuição das despesas') use estatisticas=true: computa min/máx/média/mediana/desvio/percentis sobre TODAS as despesas filtradas e devolve top/bottom (padrão 10) com identificadores — os modos agregados só somam por grupo e não revelam a distribuição nem o extremo individual. Sem agruparPor → distribuicao das despesas individuais + top/bottom; com agruparPor (senador/tipo/mes/fornecedor) → grupos[] ranqueados por soma decrescente (grupos[0] = maior gastador), cada um com sua mini-distribuição. Sem estatisticas: nos modos agregados (por-senador/por-tipo/por-mes/por-fornecedor, padrão por-senador) traz agregado[] ordenado por total desc com chave, total e despesas (contagem); em modo='detalhe' traz despesas[] (mês, data, senador, tipoDespesa, fornecedor, cnpjCpf, valor). Filtre por mes, codSenador, nomeSenador, tipoDespesa ou fornecedor (busca parcial); limite cap 100 com aviso ao truncar. Obtenha codSenador via senado_listar_senadores.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anoYesAno das despesas
mesNoFiltrar por mês
modoNoAgregação ou detalhe (padrão: por-senador). Ignorado quando estatisticas=truepor-senador
topNNoTamanho das listas top/bottom quando estatisticas=true sem agruparPor (padrão: 10, máx: 100)
limiteNoMáximo de linhas no resultado (padrão: 100)
agruparPorNoQuando estatisticas=true, ranqueia os grupos por soma decrescente (grupos[0] = maior gastador), cada grupo com sua mini-distribuição
codSenadorNoFiltrar por código do senador
fornecedorNoFiltrar por fornecedor (busca parcial)
nomeSenadorNoFiltrar por nome do senador (busca parcial)
tipoDespesaNoFiltrar por tipo de despesa (busca parcial)
estatisticasNoComputa estatísticas (min/máx/média/mediana/percentis) + ranking top/bottom sobre todas as despesas filtradas. Use para 'quem gastou mais/menos', 'gasto médio/mediano', 'distribuição', 'ranking'

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. Changed4 schema fields changed
    • addedInput schema / properties / agruparPor
      Added value: +{
      +  "description": "Quando estatisticas=true, ranqueia os grupos por soma decrescente (grupos[0] = maior gastador), cada grupo com sua mini-distribuição",
      +  "enum": [
      +    "senador",
      +    "tipo",
      +    "mes",
      +    "fornecedor"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / estatisticas
      Added value: +{
      +  "default": false,
      +  "description": "Computa estatísticas (min/máx/média/mediana/percentis) + ranking top/bottom sobre todas as despesas filtradas. Use para 'quem gastou mais/menos', 'gasto médio/mediano', 'distribuição', 'ranking'",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / modo / description
      Previous value: -"Agregação ou detalhe (padrão: por-senador)"New value: +"Agregação ou detalhe (padrão: por-senador). Ignorado quando estatisticas=true"
    • addedInput schema / properties / topN
      Added value: +{
      +  "default": 10,
      +  "description": "Tamanho das listas top/bottom quando estatisticas=true sem agruparPor (padrão: 10, máx: 100)",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  4. Changed4 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / codSenador / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / codSenador / minimum
      Added value: +-9007199254740991
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +{}
  5. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {},
      +  "type": "object"
      +}
  6. 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/openWorld, so the safe-read profile is covered. The description adds real behavioral context beyond that: limite is capped at 100 with an aviso on truncation, groups are ranked by descending sum with grupos[0] as the top spender, and topN defaults to 10. It stops short of noting pagination or performance limits on full-year scans.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the estatisticas routing are front-loaded, which is good, but the single dense paragraph then restates output field lists (mes, data, senador, tipoDespesa, fornecedor, cnpjCpf, valor) and enum semantics that already live in the schema and output schema. It is longer than needed, and some clauses duplicate structured data rather than adding value.

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 11-parameter tool with two enums and an output schema, the description covers everything an agent must decide before calling: which mode, when statistics apply, how grouping changes results, how filtering interacts, truncation behavior, and where to get the senator code. Nothing essential to correct invocation is missing.

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 goes beyond per-field docs by explaining cross-parameter behavior: estatisticas overrides modo, agruparPor switches the ranking output, and filters combine on the filtered set. The pointer to obtain codSenador via senado_listar_senadores also adds operational meaning the schema does not carry.

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 states a concrete verb+resource: CEAPS parliamentary-quota expenses for senators in a given year, and it enumerates the aggregation/statistics modes it returns. It is clearly distinguishable from generic budget siblings such as senado_orcamento_parlamentar and senado_execucao_orcamentaria by the CEAPS domain, though it never names an alternative tool to contrast against.

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 explicit question-to-parameter routing: for max/min/mean/median/distribution/ranking questions use estatisticas=true, otherwise pick an aggregate mode or modo='detalhe'. It explains precisely why the statistics path is needed ('the aggregate modes only sum by group and don't reveal distribution or the individual extreme') and how agruparPor changes the output, which is exactly the when/when-not guidance an agent needs.

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.