Skip to main content
Glama

Dados Abertos Senado BR MCP

Buscar legislação federal

senado_buscar_legislacao
Read-onlyIdempotent

Busca normas jurídicas federais já promulgadas (leis, decretos, leis complementares, emendas constitucionais etc.) combinando os filtros tipo, numero, ano e data em modo AND; informe ao menos um: uma chamada sem nenhum filtro retorna erro determinístico, não uma lista vazia. Somente leitura, sem efeitos colaterais; consulta ao vivo à base oficial de dados abertos, cujos resultados podem variar entre chamadas. Retorna { count, normas } sem paginação: count é o total de normas que casam (0, sem erro, quando nenhuma casa) e cada item traz codigo, tipo, descricaoTipo, numero, ano, data (ISO AAAA-MM-DD), norma, ementa e apelido, com null nos campos ausentes. Passe o codigo a senado_obter_legislacao para obter a indexação temática e a URL do texto integral. Para proposições ainda em tramitação (PEC, PL, PLP, MPV) use senado_buscar_materias; esta ferramenta cobre apenas normas já promulgadas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anoNoAno de assinatura/promulgação da norma, entre 1900 e 2100; ex.: 2021.
dataNoData exata de assinatura no formato compacto AAAAMMDD (8 dígitos, sem separadores), ex.: 20210401. Atenção: difere do campo `data` retornado, que vem em ISO AAAA-MM-DD.
tipoNoSigla oficial da espécie normativa: LEI, DEC (decreto), LCP (lei complementar), EMC (emenda constitucional), entre outras; catálogo completo em senado_tabelas_referencia (tabela=tipos-norma). Omitir alarga a busca a todas as espécies.
numeroNoNúmero sequencial da norma (inteiro > 0), ex.: 14133 para a Lei n. 14.133/2021. Combina com `tipo` e `ano` em modo AND.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.9/5.0
Behavior5/5

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

The annotations already declare readOnlyHint, idempotentHint, and openWorldHint, but the description adds meaningful behavioral context: it is a live query against the official open-data base whose results may vary between calls, a no-filter call errors deterministically, there is no pagination, and absent fields are returned as null. This goes well beyond the structured hints without contradicting them.

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: core purpose, filtering semantics, error behavior, read-only/live nature, return shape, null handling, and routing to the related sibling tool. It is front-loaded with the primary purpose and avoids redundant restatement of the tool name or title.

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 search tool with no required parameters but a non-obvious precondition, the description fully covers the agent's needs: valid input combinations, error behavior, output structure without pagination, null-field semantics, and how to continue using the returned codigo with senado_obter_legislacao. The routing guidance for senado_buscar_materias closes the main ambiguity with sibling tools.

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?

The schema already documents each parameter at 100% coverage, so the description does not need to repeat individual parameter meanings. It adds value by specifying the AND combination semantics across tipo, numero, ano, and data, and by imposing the at-least-one-filter rule that the schema itself does not enforce. This is a strong supplement, though the individual parameter details remain schema-driven.

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 clearly identifies the tool as searching already-enacted federal legal norms, naming concrete types (leis, decretos, leis complementares, emendas constitucionais) and the filtering mechanism. It distinguishes itself from the sibling senado_buscar_materias by explicitly limiting scope to promulgated norms, so an agent can select it correctly.

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 explicit when-to-use guidance: enacted federal norms only. It also names the alternative for pending proposals (senado_buscar_materias) and specifies the critical precondition that at least one filter must be provided, warning that a filterless call returns a deterministic error rather than an empty list.

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.

TDQS

A4.1/5.0
Disambiguation2/5

Several tools perform overlapping functions (e.g., senado_buscar_materias vs senado_search_processos, senado_contratos vs senado_contratacoes_lista, and three e-cidadania consultation tools). Although descriptions are detailed, an agent can easily select the wrong one without deep inspection.

Naming Consistency3/5

All tools share the 'senado_' prefix, but the pattern is inconsistent: some use Portuguese verbs (buscar, listar, obter), others English 'search', and some are bare nouns (senado_ceaps, senado_mesa, senado_vetos). This mixed convention reduces predictability.

Tool Count2/5

67 tools is far above the 25 threshold, indicating an overgrown surface. While each tool may serve a niche endpoint, the sheer number makes it difficult for an agent to choose efficiently, and many tools could be consolidated.

Completeness4/5

The toolset covers nearly every aspect of Senate open data (legislative, senatorial, committee, administrative, financial, e-cidadania) with list/detail/searches. Minor gaps exist, such as no direct consolidated contract search, but most workflows can be achieved.