Skip to main content
Glama

Buscar Processo Por Numero

buscar_processo_por_numero

Retrieve Brazilian court case details by CNJ number from DataJud, including court, class, subjects, instances, and movement history; optionally add parties and lawyers from DJEN publications.

Instructions

Busca os dados de um processo judicial pelo número CNJ.

Consulta a API pública DataJud (CNJ) e retorna metadados do processo, classe, assuntos, órgão julgador, todas as instâncias (1º grau, 2º grau...) e o histórico de movimentações de todas elas (cada uma marcada com o grau).

A API pública do DataJud NÃO informa as partes. Com incluir_partes_djen=True, partes e advogados são obtidos das publicações do DJEN (quando houver).

Cobertura: 92 siglas de tribunais cadastradas (STF, STJ, TST, TSE, STM, TRF1-6, TRTs, TJs estaduais, TREs e militares estaduais).

Input Schema

NameRequiredDescriptionDefault
tribunalNoSigla do tribunal (ex: 'TJSP', 'TRF4', 'STJ'). Se omitida, o tribunal é deduzido do próprio número CNJ.
numero_processoYesNúmero no formato CNJ (ex: '0001234-56.2023.8.26.0100') ou sem formatação (20 dígitos).
incluir_partes_djenNoCompleta partes e advogados com dados do DJEN (padrão True).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the upstream public API, that parties are NOT available from DataJud, that DJEN supplementation is best-effort ('quando houver'), and the 92-tribunal coverage scope. It omits error/not-found behavior and any rate-limit or latency expectations, which keeps it short of 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short paragraphs, front-loaded with the core action and followed by source, limitation, and coverage. Each sentence contributes distinct information and nothing is repeated from the schema.

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?

For a 3-parameter lookup with an output schema present, the description covers source, return shape, data limitations, and tribunal coverage. Only failure modes (invalid CNJ number, unsupported tribunal) are unaddressed.

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 real meaning beyond the schema for incluir_partes_djen: it explains that parties may be absent because they come from DJEN publications, which the schema text does not convey.

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 ('Busca os dados de um processo judicial pelo número CNJ') and immediately names the source (DataJud) and the returned contents (metadados, classe, assuntos, órgão julgador, instâncias, movimentações). An agent can distinguish it from siblings like listar_movimentacoes or buscar_comunicacoes_djen without opening the schema.

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?

The description implies the use case (retrieve full process data by CNJ number) and explains the incluir_partes_djen condition, but never names an alternative tool or an explicit when-not-to-use case, leaving routing to inference.

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