Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LEIS_RGNoripgrep program.rg
LEIS_GITNogit program.git
LEIS_LOGNoLog level: erro, aviso, info or depuracao. The log goes to stderr.info
LEIS_RAMONoBranch of the corpus.main
LEIS_CLONENoFolder of the partial clone.~/.cache/leis-mcp/acervo
LEIS_CORPONoFolders whose body goes into the FTS5 index, for example constituicao,federal/leis-ordinarias.
LEIS_ESCOPONoSpheres and folders in the clone, for example constituicao,federal,estaduais/SP,municipais/SP/campinas.constituicao,federal
LEIS_INDICENoSQLite file of the index.~/.cache/leis-mcp/indice.sqlite
LEIS_REMOTONoGit repository of the corpus.https://github.com/viniciusdsandrade/leis.git
XDG_CACHE_HOMENoWhen set, the cache folder is $XDG_CACHE_HOME/leis-mcp.
LEIS_ORCAMENTO_TOKENSNoToken budget of each result.8000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
leis_buscarA

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.

leis_obterA

Lê uma norma por caminho, URN ou citação, inteira (paginada por artigo) ou só um dispositivo. Omite redações tachadas por padrão e avisa. Se a citação for ambígua, devolve candidatos.

leis_facetasA

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

leis_coberturaA

Mostra as lacunas de um recorte (COBERTURA.md, PROGRESSO.md e _falhas.jsonl) e o estado do índice local: commit, data do sync, escopo e totais.

leis_autoriaA

Mostra quem assinou uma norma (autor, coautores e origem da autoria) ou lista as normas de um signatário. Vem da base inicial do histórico; as datas vêm do cabeçalho.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct operation: leis_buscar lists matching norms, leis_facetas aggregates counts, leis_obter retrieves a single norm's text, leis_cobertura reports index/coverage diagnostics, and leis_autoria handles authorship. The shared filter vocabulary between buscar and facetas is explicitly signposted, and their outputs (items vs. counts) are clearly different, so an agent can select confidently.

Naming Consistency4/5

All names share the same 'leis_' namespace prefix and are lowercase snake-style, which makes the set predictable. The only wrinkle is a mixed verb/noun pattern (buscar, obter are verbs; facetas, cobertura, autoria are nouns), but this still reads naturally and doesn't impede selection.

Tool Count5/5

Five tools is a tight, well-scoped surface for a local legal-norm archive: one search, one fetch, one aggregation, one diagnostics, one authorship. Nothing appears redundant and no obvious capability is bolted on unnecessarily.

Completeness4/5

The read-only lifecycle for the domain is well covered: discovery (buscar), retrieval (obter), aggregation (facetas), corpus health (cobertura), and provenance (autoria). Minor gaps exist — no dedicated version-history/comparison tool despite versao_texto being exposed, and no explicit export/raw-text operation — but agents can work around these via obter.

Maintenance

ActivityMaintained
ResponsivenessNo issues