Skip to main content
Glama
SidneyBissoli

Senado BR — Brazilian Federal Senate Open Data

Detalhar votação

senado_obter_votacao
Read-onlyIdempotent

Retrieve Brazilian Senate plenary vote details by vote or session code, including individual senator votes, tally, and result.

Instructions

Obtém detalhes de uma votação de plenário, incluindo votos nominais. codigoVotacao aceita OS DOIS códigos que a fonte publica para a mesma votação: o codigoVotacao de 4 dígitos (ex.: 7101 — o que senado_search_votacoes e senado_votacoes_senador devolvem nesse campo) ou o codigoSessao de 6 dígitos da sessão plenária (ex.: 581816). Com o código da votação retorna aquela votação; com o da sessão retorna { codigoSessao, count, votacoes } com todas as votações da sessão. Cada votação traz placar, resultado legível + resultadoCodigo bruto, secreta e votos[] (codigoSenador, nomeSenador, partido, uf, voto). Resolver o código de 4 dígitos exige varrer uma janela temporal: por padrão a janela recente da fonte (~12 meses); para votação mais antiga informe ano. Código que não existe em nenhum dos dois espaços retorna erro — nunca lista vazia. Atenção: códigos de senado_votacao_comissao e o codigoVotacao de senado_orientacao_bancada pertencem a OUTROS espaços de numeração e não são válidos aqui.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anoNoSó para código de votação de 4 dígitos ANTERIOR aos últimos ~12 meses: o ano em que a votação ocorreu, para abrir a janela de busca
codigoVotacaoYesCódigo da votação (4 dígitos, ex. 7101) OU o codigoSessao da sessão plenária (6 dígitos, ex. 581816) — os dois são aceitos

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.10.0
    • addedInput schema / properties / ano
      Added value: +{
      +  "description": "Só para código de votação de 4 dígitos ANTERIOR aos últimos ~12 meses: o ano em que a votação ocorreu, para abrir a janela de busca",
      +  "maximum": 2100,
      +  "minimum": 1990,
      +  "type": "integer"
      +}
    • changedInput schema / properties / codigoVotacao / description
      Previous value: -"Código único da votação (codigoSessao da sessão plenária)"New value: +"Código da votação (4 dígitos, ex. 7101) OU o codigoSessao da sessão plenária (6 dígitos, ex. 581816) — os dois são aceitos"
  2. Changed3 schema fields changedv3.9.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed3 schema fields changedv3.3.3
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / codigoVotacao / maximum
      Added value: +9007199254740991
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +{}
  4. First observedv3.3.1

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark this as read-only and idempotent, and the description adds substantial behavioral detail: the two possible return shapes, the temporal window default of ~12 months, and the error behavior ('retorna erro — nunca lista vazia'). This goes well beyond what annotations alone provide.

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?

The description is dense but every sentence earns its place: purpose, code semantics, return shape, temporal caveat, error behavior, and invalid-code exclusions. It is front-loaded with the core purpose and then builds logically through operational details.

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 a tool with two parameters, an output schema, and read-only annotations, the description is complete. It covers both input modes, the output structure, the temporal resolution behavior, error semantics, and exclusions from sibling tools, leaving no practical gap for an agent invoking it.

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?

Although schema coverage is 100%, the description adds crucial meaning: codigoVotacao can be either a 4-digit vote code or a 6-digit session code, with concrete examples, and 'ano' is only needed to widen the search window for older votes. This is exactly the kind of semantic clarification an agent needs.

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 description opens with a specific verb and resource: 'Obtém detalhes de uma votação de plenário, incluindo votos nominais.' It further distinguishes itself from siblings by explicitly stating which codes from senado_search_votacoes and senado_votacoes_senador are accepted, and which codes from senado_votacao_comissao and senado_orientacao_bancada are not valid here.

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?

The description gives clear when-to-use guidance: it explains the dual-code behavior, when to pass 'ano' for older votes, and explicitly warns that committee and bancada orientation codes belong to other numbering spaces and are invalid. This effectively routes the agent away from incorrect alternatives.

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

Deploy Server

Other Tools