Skip to main content
Glama

Buscar normas

leis_buscar
Read-onlyIdempotent

Search Brazilian legislation in a local corpus by keywords, type, agency, sphere, date, and status, with filters and cursor pagination to retrieve compact norm metadata and text snippets.

Instructions

Busca normas no acervo local por palavras e filtros. Devolve itens compactos com caminho, título, tipo, número, data, UF, ementa, situação, fonte, versao_texto, baixado_em e marca de OCR. Use o cursor para a próxima página.

Input Schema

NameRequiredDescriptionDefault
ufNoSigla da UF, por exemplo SP. Vale para estaduais e municipais.
tipoNoTipo de norma: nome, sigla ou pasta. Exemplos: lei, lei complementar, decreto, decreto-lei, mp, sumula, leis-ordinarias.
orgaoNoÓrgão regulador como na pasta, por exemplo anvisa, rfb ou contran.
textoNoPalavras para buscar. Use aspas para uma frase exata e * no fim de uma palavra para prefixo. Sem texto, lista pelos filtros.
cursorNoCursor da resposta anterior, para a próxima página. Use sem mudar os outros parâmetros.
esferaNoEsfera do acervo.
limiteNoItens por página.
numeroNoNúmero da norma, por exemplo 8.078, 123 ou 2200-2.
alcanceNocabecalho: título e ementa. texto: corpo da norma (índice do corpo, ou ripgrep nas pastas do filtro).cabecalho
data_deNoData mínima da norma: AAAA-MM-DD ou só o ano AAAA.
formatoNoresumido: campos essenciais e ementa curta. completo: todos os metadados do índice.resumido
data_ateNoData máxima da norma: AAAA-MM-DD ou só o ano AAAA.
revogadaNotrue: só normas marcadas como revogadas. false: só as não revogadas.
tribunalNoTribunal, por exemplo stf, stj ou tst.
municipioNoMunicípio como na pasta do acervo, por exemplo campinas ou rio-de-janeiro.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description goes beyond them by describing the returned item shape (path, título, tipo, número, data, UF, ementa, situação, fonte, versao_texto, baixado_em, OCR flag) and pagination via cursor, which matters because there is no output schema; it stops short of noting ordering or result-size behavior.

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?

Two sentences, front-loaded with the purpose before the return shape and pagination note. The field enumeration is long but justified given the absence of an output schema; otherwise there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 15 optional parameters, full schema coverage and rich annotations, the description fills the main remaining gap — what comes back and how to page — which is exactly what a query tool needs absent an output schema. Minor omissions like result ordering or behavior when no filters are supplied are low-stakes.

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 already documents every parameter with examples, enums and defaults (including the 'sem texto, lista pelos filtros' rule and alcance modes). The description only gestures at 'palavras e filtros' and the cursor, so it adds no parameter meaning beyond the schema — baseline 3 applies.

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?

States a specific verb and resource ('Busca normas') and scopes it to the local corpus ('acervo local'), which is meaningfully different from a web search. It does not name or differentiate against siblings like leis_obter or leis_facetas, so an agent must infer that this is the search/list entry point versus a single-record fetch.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by 'por palavras e filtros', and the description adds a procedural hint about using the cursor for the next page. However, it never states when to choose this over leis_obter or leis_facetas, nor any exclusions or prerequisites, leaving routing between siblings to inference.

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