Skip to main content
Glama

Dados Abertos Senado BR MCP

Detalhar norma legal

senado_obter_legislacao
Read-onlyIdempotent

Obtém o detalhe de uma norma federal já promulgada pelo seu codigo interno. Somente leitura, sem efeitos colaterais; consulta ao vivo à base oficial de dados abertos. Retorna um objeto com codigo, tipo, descricaoTipo, numero, ano, data (ISO AAAA-MM-DD), norma, apelido, ementa, indexacao (termos temáticos) e url do texto integral — campos ausentes na norma vêm null, e codigo inexistente retorna erro "Norma não encontrada", não um objeto vazio. Obtenha o codigo antes via senado_buscar_legislacao (é o identificador interno da norma, não o número da lei). Para localizar normas por tipo/número/ano use senado_buscar_legislacao; esta serve só para o detalhe de uma norma já identificada.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codigoYesIdentificador interno da norma no acervo do Senado (inteiro > 0) — o campo `codigo` retornado por senado_buscar_legislacao. Não confundir com o número da lei: a Lei n. 14.133/2021 tem numero=14133, mas seu codigo interno é outro valor.

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. Changed1 schema field changed
    • changedInput schema / properties / codigo / description
      Previous value: -"Identificador interno da norma (campo `codigo` retornado por senado_buscar_legislacao; ≠ número da lei)"New value: +"Identificador interno da norma no acervo do Senado (inteiro > 0) — o campo `codigo` retornado por senado_buscar_legislacao. Não confundir com o número da lei: a Lei n. 14.133/2021 tem numero=14133, mas seu codigo interno é outro valor."
  4. Changed1 schema field changed
    • changedInput schema / properties / codigo / description
      Previous value: -"Código único da norma"New value: +"Identificador interno da norma (campo `codigo` retornado por senado_buscar_legislacao; ≠ número da lei)"
  5. Changed3 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / codigo / maximum
      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.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the 'somente leitura, sem efeitos colaterais' line is largely redundant. The description does add real value beyond annotations: a live query against the official open-data base, null semantics for absent fields, and an explicit error contract ('Norma não encontrada' rather than an empty object).

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 purpose, then behavior/return contract, then sibling routing — a logical order where each sentence earns its place. It runs slightly long, with some overlap between the return-field enumeration and the output schema plus a repeated warning about codigo vs. numero.

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?

An output schema exists and annotations cover the safety profile, yet the description still supplies the error case, null handling, and upstream dependency on the search tool. Nothing an agent needs to invoke this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema's own codigo description already explains the internal-ID vs. law-number distinction, which the description merely restates. It adds only that the value should be sourced from senado_buscar_legislacao, so the baseline of 3 applies.

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 and resource ('Obtém o detalhe de uma norma federal já promulgada pelo seu codigo interno') and explicitly distinguishes itself from senado_buscar_legislacao, which it names as the lookup tool. An agent can tell the two apart 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?

Explicit routing: get the codigo first via senado_buscar_legislacao, and use that tool for locating norms by tipo/numero/ano, while 'esta serve só para o detalhe de uma norma já identificada.' The when-to-use and the alternative are both stated.

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.