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

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. Changed7 schema fields changed
    • changedInput schema / properties / ano / description
      Previous value: -"Ano de assinatura/promulgação da norma"New value: +"Ano de assinatura/promulgação da norma, entre 1900 e 2100; ex.: 2021."
    • changedInput schema / properties / data / description
      Previous value: -"Data exata de assinatura, formato YYYYMMDD"New value: +"Data 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."
    • addedInput schema / properties / data / pattern
      Added value: +"^\\d{8}$"
    • changedInput schema / properties / numero / description
      Previous value: -"Número da norma; combina com tipo e ano como filtro AND"New value: +"Número sequencial da norma (inteiro > 0), ex.: 14133 para a Lei n. 14.133/2021. Combina com `tipo` e `ano` em modo AND."
    • addedInput schema / properties / numero / exclusiveMinimum
      Added value: +0
    • removedInput schema / properties / numero / minimum
      Removed value: --9007199254740991
    • changedInput schema / properties / tipo / description
      Previous value: -"Sigla oficial da espécie: LEI, DEC (decreto), LCP (lei complementar), EMC (emenda constitucional) etc.; lista completa em senado_tabelas_referencia (tabela=tipos-norma)"New value: +"Sigla 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."
  4. Changed4 schema fields changed
    • changedInput schema / properties / ano / description
      Previous value: -"Ano da norma"New value: +"Ano de assinatura/promulgação da norma"
    • changedInput schema / properties / data / description
      Previous value: -"Data da norma (YYYYMMDD)"New value: +"Data exata de assinatura, formato YYYYMMDD"
    • changedInput schema / properties / numero / description
      Previous value: -"Número da norma"New value: +"Número da norma; combina com tipo e ano como filtro AND"
    • changedInput schema / properties / tipo / description
      Previous value: -"Tipo da norma (ex: LEI, DEC, LCP, EMC)"New value: +"Sigla oficial da espécie: LEI, DEC (decreto), LCP (lei complementar), EMC (emenda constitucional) etc.; lista completa em senado_tabelas_referencia (tabela=tipos-norma)"
  5. Changed4 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / numero / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / numero / minimum
      Added value: +-9007199254740991
    • 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.6/5.0
Behavior4/5

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

Annotations already cover readOnly/openWorld/idempotent/destructive, but the description adds real behavioral context beyond them: the live query against the official open-data base whose results may vary between calls, and the deterministic error (not an empty list) when no filter is supplied. The return-shape narration is largely redundant with the output schema, which keeps this from a 5.

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?

Front-loaded with the core purpose and the AND/at-least-one constraint before alternatives and return details. It is a dense but coherent single block; the sentence spelling out every returned field overlaps with the output schema and is the one piece of avoidable length.

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 4-param read-only search with an output schema already present, the description supplies everything else an agent needs: the at-least-one-filter rule, AND combination, live-data variability, sibling routing, and the follow-up tool for full text. Nothing required to invoke it correctly 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 adds semantics the schema does not state: the four filters combine in AND mode, and at least one must be provided or the call fails deterministically. It also points to senado_tabelas_referencia for the tipo catalog, which the schema only mentions in passing.

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?

States a specific verb+resource (busca normas jurídicas federais já promulgadas) and enumerates the covered species (leis, decretos, LCP, EMC). It explicitly carves out the sibling boundary by naming senado_buscar_materias for proposições em tramitação, so the agent can distinguish it without opening either schema.

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?

Gives an explicit usage constraint ('informe ao menos um' filtro, com erro determinístico se omitido) and an explicit alternative with the selecting condition (proposições em tramitação → senado_buscar_materias). It also routes the follow-up step to senado_obter_legislacao via the returned codigo.

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.