Skip to main content
Glama

Contar normas

leis_facetas
Read-onlyIdempotent

Counts Brazilian legislation by sphere, type, state, agency, court, municipality, and decade with search filters to profile corpus distribution and coverage gaps.

Instructions

Conta normas por esfera, tipo, UF, órgão, tribunal, município e década, com os mesmos filtros de leis_buscar.

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.
textoNoRestringe as contagens às normas cujo título ou ementa têm estas palavras.
esferaNoEsfera do acervo.
limiteNoValores por dimensão.
numeroNoNúmero da norma, por exemplo 8.078, 123 ou 2200-2.
data_deNoData mínima da norma: AAAA-MM-DD ou só o ano AAAA.
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.
dimensoesNoDimensões a contar. Padrão: esfera, tipo e decada.
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

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, covering the safety profile. The description adds the useful cross-reference that filters mirror leis_buscar, but it does not clarify return shape or how 'limite' interacts across multiple dimensions, which matters for a 13-parameter aggregation tool.

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?

A single front-loaded sentence that states the action, dimensions and filter relationship with zero filler. Every clause carries information.

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

Completeness3/5

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

For a read-only aggregation tool with a fully documented 13-parameter schema, the description is adequate but thin: it never states that the result is counts grouped per requested dimension or how 'limite' caps each dimension's bucket, and no output schema exists to fill that gap.

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 a baseline of 3 applies. The description earns extra credit by asserting the filter set is the same as leis_buscar, which conveys semantics (matching/filtering behavior) the schema itself does not state, and its dimension list corroborates the 'dimensoes' enum.

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 ('conta') and resource ('normas'), and enumerates the exact dimensions aggregated (esfera, tipo, UF, órgão, tribunal, município, década). It also distinguishes itself from the sibling leis_buscar by positioning itself as the counting counterpart with the same filters.

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

Usage Guidelines4/5

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

The phrase 'com os mesmos filtros de leis_buscar' implicitly tells the agent to use this tool when aggregates are wanted instead of document listings, and that filter semantics are shared with the sibling. However, there is no explicit 'when not to use' or a direct statement contrasting it with leis_buscar in an imperative form.

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