Skip to main content
Glama

MCP-Processo é um servidor MCP que faz RAG local sobre processos judiciais e administrativos volumosos em PDF (PJe, SEI, escaneados) no Claude Desktop/Code.

Jogar um PDF de 2 mil páginas no chat estoura a janela de contexto e gera alucinação. Aqui o processo vira texto página a página + um índice local — e na conversa entram só os trechos relevantes de cada pergunta, sempre com citação de (arquivo, p. N) verificável no original. Um caso de 2.000 páginas custa ao chat o mesmo que um de 20.

Feito por um advogado, para uso forense real: heurística anti-rodapé-PJe, índice de peças pela árvore do processo, cronologia por data de assinatura, validação literal de citações (dígito trocado é rejeitado) e quadro de controvérsias em .docx.

⚔️ Como funciona

~/Processos/meu-caso/  ←  jogue o(s) PDF(s) na pasta
        │
        ▼
"prepara o caso"       →  texto página a página + OCR local (grátis)
        │                 portão de integridade: o que ficou ilegível?
        ▼
"pode indexar"         →  estimativa de custo → SUA confirmação → índice
        │                 híbrido BM25 + denso (voyage-4-large) + rerank
        ▼
"busca X no caso"      →  trechos com página exata:【arquivo — p. N】
  • 1 chunk = 1 página — a unidade natural de citação forense.

  • Busca por sentido ("quebra da affectio societatis" acha "perda da clientela") e por identificador ("Lei 3.208", nº CNJ completo).

  • Índice visual (voyage-multimodal-3): página fotográfica/ilegível continua achável pela aparência.

  • Incremental por hash e conteúdo: PDF novo, substituído ou re-OCRizado reindexa só o que mudou — nunca o caso inteiro.

Related MCP server: pdf-context

🛠️ As 13 ferramentas

Ferramenta

O que faz

listar_casos

pastas de ~/Processos com status (PDFs, preparo, índice, resumo)

preparar_caso

extração + OCR local; caso grande roda em background

status_caso

progresso, pendências com custo, avisos de integridade

indexar_caso

estimativa → confirmação obrigatória → indexação (background se grande)

buscar

híbrida + rerank, filtro opcional por arquivo, seção de páginas visuais

obter_pagina

texto literal da página (validação de leitura)

abrir_pagina

abre o PDF original na página, no navegador

indice_pecas

árvore de documentos reconstruída do rodapé PJe (ou do nome do arquivo)

cronologia

peças ordenadas pela data de assinatura

validar_citacoes

CONFIRMADA · QUASE · DIVERGENTE · PÁGINA ERRADA · NÃO ENCONTRADA

quadro_controversias

tabela autor × réu em .docx paisagem

resumo_caso

memória do caso entre conversas (com backup automático)

ocr_nuvem

opt-in: Google Document AI para o que o OCR local não leu

🔍 OCR em cascata

Nível

Motor

Onde roda

Custo

1º

Apple Vision (Neural Engine)

100% local

zero

2º

Tesseract (fallback automático)

100% local

zero

—

Portão de integridade — lista o que ficou ilegível ANTES de qualquer gasto

local

zero

3º

Google Document AI (ocr_nuvem)

nuvem ⚠️

~US$ 1,50/1.000 pág.

O 3º nível é sempre manual e seletivo: a ferramenta lista as candidatas e o custo exato sem enviar nada; você audita as duvidosas com abrir_pagina (foto/planta sem texto não vale envio) e autoriza só as páginas que quiser (paginas=[...]). Sem motor de OCR funcional, o preparo aborta antes de destruir a extração anterior.

💰 Custos: nada é gasto sem confirmação

  • Extração + OCR local: grátis, ilimitado.

  • Indexação (Voyage): centavos por caso (~R$ 1,70 em um processo real de 1.561 páginas). Estimativa exata antes, confirmação sua, sempre.

  • OCR em nuvem (opt-in): cobrado por página, prévia exata, requisição que falha não é cobrada.

  • Texto (e imagem das páginas visuais) vai à Voyage sob política no-train do plano pago; para material sigiloso, use billing ativo.

📦 Instalação

git clone https://github.com/fxbarros/MCP-Processo && cd MCP-Processo
uv sync

Pré-requisitos: uv, Tesseract com por (brew install tesseract tesseract-lang), chave Voyage AI no Keychain (keyring set voyage-ai api_key). Registro no Claude Desktop (claude_desktop_config.json):

"processos": {
  "command": "uv",
  "args": ["--directory", "/caminho/para/MCP-Processo", "run", "processo-mcp"]
}

Instaladores prontos (Mac e Windows) em distribuicao/LEIA-ME.md.

OCR em nuvem (ocr_nuvem) — configuração opcional

Só necessário se você quiser o 3º nível da cascata (Google Document AI) para páginas que o OCR local não leu. No Windows este recurso pesa mais: sem o Vision, o Tesseract falha com mais frequência em página fotografada — mais páginas caem na lista de ilegíveis.

No Google Cloud (1 vez): crie um projeto com billing ativo, habilite a Cloud Document AI API e crie um processador em Document AI → Galeria de processadores → Digitalização de texto → Document OCR (⚠️ não use a seção "Processadores personalizados" — são outros produtos, 20× mais caros). Anote o ID do processador e a região. Depois crie uma service account com o papel Usuário da API Document AI e baixe a chave JSON.

Na máquina, dois arquivos — nunca no repositório:

mkdir -p ~/.config/processo-mcp
mv ~/Downloads/sua-chave.json ~/.config/processo-mcp/gcp-ocr.json && chmod 600 ~/.config/processo-mcp/gcp-ocr.json
echo '{"processor_id": "SEU_ID", "location": "us"}' > ~/.config/processo-mcp/docai.json

No Windows, os mesmos nomes em C:\Users\<voce>\.config\processo-mcp\ (é aí que o código procura; o chmod não se aplica). Caminhos alternativos via env PROCESSO_MCP_GCP_CRED e PROCESSO_MCP_DOCAI_CONFIG no bloco do config. Faltando algo, a própria ferramenta responde com a instrução exata do que falta.

Windows

O projeto roda em Windows com duas diferenças: o OCR usa só o Tesseract (o Apple Vision não existe fora do macOS — qualidade inferior em página fotografada) e o instalador distribuicao\instalar-windows.ps1 nunca foi testado em máquina real. Se preferir não usá-lo (ou se ele falhar), o passo a passo manual:

  1. Instale o uv e o Tesseract: winget install astral-sh.uv UB-Mannheim.TesseractOCR

  2. Se faltar o idioma português, copie por.traineddata para C:\Program Files\Tesseract-OCR\tessdata\ (a pasta exige permissão de administrador).

  3. Na pasta do projeto, rode uv sync e grave a chave Voyage no Gerenciador de Credenciais do Windows:

    uv run python -c "import keyring; keyring.set_password('voyage-ai','api_key','SUA-CHAVE')"

    Depois, limpe o comando do histórico do PowerShell (a chave fica visível nele).

  4. Registre o mesmo bloco JSON acima em %APPDATA%\Claude\claude_desktop_config.json, com o caminho do projeto no formato Windows (ex.: C:/Users/voce/MCP-Processo).

  5. Os casos ficam em C:\Users\voce\Processos\ — ou aponte outra pasta via "env": {"PROCESSO_MCP_PASTA": "D:/outro/caminho"} no bloco do config.

💬 Uso no dia a dia

você: prepara o caso acp-sol-nascente claude: 1.561 páginas, 69 OCR, 0 ilegíveis. Pendente de indexação: ~1,7M tokens → US$ 0,30 (~R$ 1,67). Autoriza? você: pode indexar você: o que o réu respondeu sobre a impenhorabilidade? claude: 【contestacao.pdf — p. 85】"A arrematação de bem impenhorável..." (...) você: valida essa citação antes de eu usar na réplica claude: CONFIRMADA ✓ (similaridade 1.0)

🍎 Escopo: uso local em macOS

Projeto desenvolvido e mantido para uso pessoal, estritamente local, em macOS (Apple Silicon). Sinceridade acima de tudo:

  • Windows/Linux: o Vision não existe fora do macOS — o OCR cai no Tesseract (qualidade inferior em página fotografada). O instalador de Windows nunca foi testado em máquina real.

  • Não é um servidor: transporte stdio puro, sem HTTP, sem autenticação, sem multiusuário. Cada pessoa roda a própria cópia na própria máquina.

  • Testado em um hardware só: MacBook Air M2 / 8 GB — lotes e limiares calibrados para esse perfil.

✅ Testes

uv run pytest

92 testes, 100% offline: rodam em pasta temporária (nunca tocam ~/Processos) e não chamam nenhuma API. Cobrem as armadilhas aprendidas em caso real — rodapé PJe mascarando página escaneada, falso-sucesso de OCR (página que "leu" só o carimbo), texto nativo virado mojibake por fonte CID sem ToUnicode, roubo de rótulo na heurística de peças, dígito trocado em citação, caracteres invisíveis das atas, órfãos no índice, rebuild sem confirmação, teto de tokens por lote, redação de chave de API em mensagem de erro.


Available Tools

12 tools
abrir_paginaB

Abre o PDF original na página indicada, na tela do usuário (navegador), para conferência visual do documento.

NameRequiredDescriptionDefault
casoYes
paginaNo
arquivoYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose a meaningful side effect: the PDF opens in the user's browser rather than returning data. However, it omits other behavioral facts an agent needs, such as what happens with an out-of-range page, whether this requires the case/file to be prepared first, or any failure behavior.

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 with no filler. The core action, target, location, and intent are all packed efficiently with zero wasted words.

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?

The presence of an output schema means return values need not be explained, which the description correctly omits. Still, with 0% parameter coverage and no annotations, the definition leaves the required "caso" argument and error/permission behavior undocumented, so it is only minimally complete for a three-parameter tool.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It only loosely signals the pagina parameter ("página indicada") and implies arquivo ("PDF original"), but says nothing about the required caso identifier and gives no format or validity details for any of the three parameters.

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 (abre), resource (PDF original), target page, and destination (navegador / tela do usuário), which clearly separates it from a content-fetching sibling like obter_pagina. It does not name that sibling explicitly, but the browser-screen framing makes the action unambiguous.

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?

"para conferência visual do documento" implies the use case (human visual inspection), so usage is inferable but never stated as a when-to-use rule. There is no exclusion or guidance distinguishing it from obter_pagina, which is the obvious alternative for retrieving page content.

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

buscarA

Busca semântica + literal no caso. Cada resultado vem com arquivo e página exata — cite sempre '(arquivo, p. N)' e confira com obter_pagina antes de afirmar algo sensível. Funciona por sentido ('quebra da affectio societatis' acha 'perda da clientela') e por identificador ('Lei 3.208'). 'arquivo' (opcional) restringe a busca a um PDF do caso — útil em caso multi-volume (ex.: só na contestação).

NameRequiredDescriptionDefault
casoYes
queryYes
top_kNo
rerankNo
arquivoNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior4/5

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

No annotations exist, so the description carries the burden and does disclose useful behavior: results include file and exact page, it works by meaning and by identifier, and 'arquivo' scopes the search to one PDF. It omits permission/rate-limit behavior but adds a verification workflow that shapes safe usage.

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 and then the output/citation contract, with the 'arquivo' usage note last. Dense but mostly efficient; the examples add value rather than padding.

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?

An output schema exists, so return-value detail is not needed, and the citation/verification workflow compensates well. However, top_k and rerank materially affect search results and are unexplained in both schema and description, leaving a real gap for a semantic-search tool.

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

Parameters2/5

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

Schema coverage is 0% and only one of five parameters is explained: 'arquivo' (optional, restricts to a single PDF, useful in multi-volume cases). caso, query, top_k, and rerank carry no meaning beyond their bare titles, leaving the retrieval-tuning parameters undocumented.

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 (busca) and resource (documentos do caso), and clarifies the dual mode 'semântica + literal' with concrete examples. It also names the sibling relationship with obter_pagina for verification, so an agent can distinguish its role from the other case-level tools.

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?

Gives clear operating context: always cite '(arquivo, p. N)' and verify with obter_pagina before asserting sensitive facts, and use the 'arquivo' filter for multi-volume cases. It stops short of explicit when-not-to-use or direct alternative routing (e.g., vs indice_pecas or cronologia).

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

cronologiaA

Linha do tempo do processo: peças ordenadas pela data de assinatura do rodapé PJe. Tipos são heurísticos — confirme peças-chave com obter_pagina.

NameRequiredDescriptionDefault
casoYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.5/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 disclose two real behavioral traits: results are ordered by the PJe footer signature date, and the piece 'Tipos' are heuristic rather than authoritative. It still omits permissions, whether prior indexing is required, and output size/pagination 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 short, front-loaded sentences with no filler; the purpose and the ordering rule come first and the reliability caveat follows. Slightly terse — 'Tipos são heurísticos' leaves 'tipos' unexplained.

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?

An output schema exists, so return-value detail is unnecessary, and the tool is low-complexity with one parameter. The description covers purpose, ordering, and a data-quality caveat, but leaves the 'caso' argument format and any indexing prerequisite unaddressed.

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

Parameters2/5

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

Schema description coverage is 0% and the description never mentions the single required parameter 'caso' at all — no indication whether it expects an ID, case number, or name. The description adds no semantics beyond what the bare schema already provides.

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 resource (cronologia/linha do tempo do processo) and a precise ordering rule (data de assinatura do rodapé PJe), which distinguishes it from index-style siblings like indice_pecas. It never names indice_pecas or resumo_caso explicitly, so sibling disambiguation is only partial.

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 closing clause 'confirme peças-chave com obter_pagina' points to an alternative tool and implicitly tells the agent this output is not authoritative for key pieces. However, it gives no positive guidance on when to reach for cronologia versus indice_pecas or resumo_caso, and no prerequisite conditions (e.g. whether indexar_caso must run first).

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

indexar_casoA

Indexa as páginas preparadas (voyage-4-large + FTS5). Com confirmar=False só mostra a estimativa de custo — NÃO gasta nada sem confirmar=True, e a confirmação deve vir do usuário, nunca ser presumida. Incremental por hash; rebuild=True refaz do zero (ex.: troca de modelo). Caso grande roda em BACKGROUND: acompanhe com status_caso (commit por PDF — nada se perde).

NameRequiredDescriptionDefault
casoYes
rebuildNo
confirmarNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior5/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 so well: it discloses cost semantics (estimate shown with confirmar=False, nothing spent without confirmar=True), the mandatory user-confirmation protocol, incremental-by-hash behavior, rebuild semantics (full reset, e.g. model change), background execution for large cases, and per-PDF commit atomicity so partial work is not lost. These are exactly the irreversible/spend traits an agent must know.

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?

Purpose is front-loaded in the first clause, followed by the safety-critical spending rule, then the incremental/rebuild distinction, then the background/monitoring note. Every sentence carries decision-relevant information with no filler.

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, so return-value explanation is correctly omitted. Given the tool's mutation-and-cost profile with three parameters, the description covers spend gating, confirmation ownership, idempotency/rebuild, execution mode, and progress monitoring — nothing needed to invoke it safely is missing.

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 description coverage is 0%, and the description compensates for two of three parameters with real meaning beyond the schema: confirmar (dry-run vs. actual spend, user-gated) and rebuild (rebuild from scratch, e.g. after a model swap). The 'caso' parameter is left implicit but is self-evident as the target case identifier, leaving only a minor gap.

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?

The description opens with a concrete verb+resource ('Indexa as páginas preparadas') and names the underlying mechanism (voyage-4-large + FTS5), which tells the agent this is the indexing step that consumes output from preparar_caso rather than a search or listing tool. Scope (entire prepared corpus of a case) is unambiguous.

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?

It gives clear operational conditions: confirmar=False is a dry-run, confirmar=True is required to spend, and confirmation 'deve vir do usuário, nunca ser presumida'. It also routes background monitoring to status_caso. What it doesn't state explicitly is the prerequisite ordering (index after preparing) or any exclusion, so it stops just short of a full when/when-not/alternative statement.

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

indice_pecasA

Índice das peças do processo, reconstruído do rodapé do PJe: nº do documento, tipo (heurístico — confirme peças-chave com obter_pagina), intervalo de páginas no PDF, data e assinante. Local, grátis, cacheado.

NameRequiredDescriptionDefault
casoYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral load. It usefully discloses that the type is heuristic (unreliable and worth verifying), that the data comes from the PJe footer, and that the operation is local, free, and cached — meaningful context about cost, speed, and data quality. It stops short of explicitly stating read-only/purity or how stale the cache can be.

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?

A single front-loaded sentence packs the purpose, the returned fields, the heuristic caveat, and the local/free/cached traits with no filler. The parenthetical tool reference is placed exactly where the risk it mitigates is mentioned.

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 one-parameter read tool with an output schema, the description covers output meaning, data provenance, the heuristic caveat, and cost/latency characteristics. The only real gap is the undocumented 'caso' argument, which keeps this from being fully self-sufficient.

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

Parameters2/5

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

There is one required parameter (caso) with 0% schema description coverage, so the description must compensate — and it does not. It never explains what form the 'caso' identifier takes (number, internal id, slug) or where the agent obtains it, leaving the sole parameter opaque.

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 concrete noun+scope: an index of the case's peças (documents) reconstructed from the PJe footer, and enumerates the returned fields (document number, type, page range, date, signer). An agent can tell what it produces. It does not, however, distinguish itself from the similarly named sibling indexar_caso, which could be confused with it.

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?

It gives one indirect usage cue: confirm key peças with obter_pagina because the type field is heuristic. But it never says when to reach for this tool over indexar_caso, resumo_caso, or status_caso, so the routing guidance is implied rather than explicit.

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

listar_casosA

Lista os casos (subpastas de ~/Processos) com status: PDFs, páginas preparadas, índice e resumo. Ponto de partida de qualquer conversa.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose the returned content (status of PDFs, prepared pages, index, summary), which implies a read-only enumeration, but it never states side-effect freedom, permissions, or cost/latency characteristics explicitly.

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?

Two compact sentences, front-loaded with the verb and scope, and the second sentence immediately positions the tool in the workflow. Nothing is redundant or padded.

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?

An output schema exists, so the description needn't detail return structure, and it correctly focuses on what gets listed and when to call it. Given zero parameters and a low-risk read operation, this is nearly complete; only an explicit read-only/safety note is missing.

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?

The tool takes zero parameters, so the baseline is 4 — there is no argument semantics for the description to clarify. The schema is an empty object, consistent with a pure enumeration call.

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+resource ('Lista os casos') and adds scope ('subpastas de ~/Processos') plus the content surfaced (PDFs, páginas preparadas, índice, resumo), so the agent knows this is an inventory/listing operation. It does not name a specific sibling it is distinct from, relying instead on the generic 'ponto de partida' framing.

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?

'Ponto de partida de qualquer conversa' gives clear context for when to reach for this tool — at the start, before drilling into a single case. There are no explicit exclusions or named alternatives (e.g. status_caso / resumo_caso), so it stops short of a full when/when-not rubric.

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

obter_paginaA

Texto LITERAL e completo de uma página (como extraído/OCR). Use para verificar citações antes de afirmar — é a fonte que valida a busca. 'arquivo' aceita nome, stem ou caminho relativo mostrado na citação.

NameRequiredDescriptionDefault
casoYes
paginaYes
arquivoYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that the returned text is raw extraction/OCR (implying possible OCR noise) and that it is the authoritative source for validating citations. However, it says nothing about error handling, missing pages, permissions, or rate limits, so it adds only partial behavioral context.

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?

Two tight sentences with no filler: the first front-loads what is returned, the second combines the use case with the one non-obvious parameter detail. Everything earns its place.

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?

An output schema exists, so return formatting need not be restated, and the description adds the key content-type characterization. The main gap is the undocumented 'caso' and 'pagina' parameters for a 3-required-param tool with no annotation support.

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 coverage is 0% and all three params are required, so the description must compensate. It documents 'arquivo' well (accepts name, stem, or relative path as shown in the citation), but 'caso' and 'pagina' receive no explanation at all, leaving two of three parameters dependent on inference.

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 (obter) and resource (page text), and specifies the return is literal/complete OCR text, which is more precise than the name alone. It links itself to the search flow ('a fonte que valida a busca'), giving some differentiation from siblings like buscar, though it never explicitly distinguishes itself from the very similar abrir_pagina sibling.

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?

Gives a concrete when-to-use directive with rationale: 'Use para verificar citações antes de afirmar.' This is a clear usage context rather than a mere implication, but no alternatives (e.g., abrir_pagina) or when-not conditions are named.

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

preparar_casoA

Extrai o texto de cada PDF do caso, página página a página (OCR local nas digitalizadas — nada sai da máquina). Grátis. Caso grande roda em background: acompanhe com status_caso. Depois, indexar_caso.

NameRequiredDescriptionDefault
casoYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.1/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 that OCR runs locally and nothing leaves the machine (privacy), that the operation is free (cost), and that large cases execute asynchronously with a companion polling tool. It omits failure behavior, idempotency, and whether existing extracted text is overwritten.

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?

Front-loaded with the core action, then terse clauses for OCR/privacy, cost, async behavior, and the follow-up step. Every fragment earns its place and nothing is padded.

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?

An output schema exists, so return values need no explanation, and the description covers the async workflow and the next step in the chain. It leaves a gap on input prerequisites and the format of 'caso', which matters for a one-parameter tool.

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

Parameters2/5

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

One parameter, 'caso', has 0% schema description coverage, and the description only refers to it obliquely as 'cada PDF do caso'. It never clarifies whether 'caso' is an ID, a name, or a path, so an agent gets no added format semantics beyond the schema.

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: extracts text from every PDF in the case, page by page, with local OCR for scanned documents. It also names its downstream sibling (indexar_caso), so an agent can place it in the pipeline without opening other schemas.

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?

Explicit sequencing guidance: run this, then indexar_caso, and for large cases poll status_caso while it runs in background. It stops short of stating prerequisites (e.g., the case must already exist/have PDFs) or when not to call it, so it is strong but not exhaustive.

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

quadro_controversiasA

Gera o Quadro de Controvérsias em .docx (paisagem, tabela formatada) em /relatorios/. VOCÊ faz a análise antes: cruze inicial × contestação com buscar/obter_pagina e monte as linhas com a citação de página DENTRO de cada célula. Cada linha: {tema, autor, reu, situacao} — ex.: situacao = 'controvertido' | 'sem impugnação específica' | 'incontroverso'. NUNCA inclua afirmação sem fonte (arquivo, p. N), e TODA transcrição literal entre aspas deve passar ANTES por validar_citacoes.

NameRequiredDescriptionDefault
casoYes
linhasYes
tituloYes
arquivoNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does so well: it discloses output format (landscape formatted table), save location, the required pre-analysis workflow, and two hard constraints (never a statement without source, quotes must be validated first). It does not state overwrite behavior or permission requirements, leaving a modest gap.

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 verb+resource+format, then workflow and constraints; nearly every clause carries operational value. It is dense with emphasis caps but not padded, though the run-on structure could be tightened.

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 document-generating tool with an output schema (so return values need not be described) and no annotations, the description covers generation, location, required prior analysis, and integrity constraints. Only edge behaviors like file overwrite and permissions 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 0%, so the description must compensate, and it substantially does: it defines the row shape {tema, autor, reu, situacao}, gives an example enum for situacao, and shows how caso maps to a path. However, the titulo and arquivo parameters are never explained, so half the surface remains undocumented.

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 (Gera) and resource (Quadro de Controvérsias), plus concrete output format (.docx, paisagem, tabela formatada) and destination (<caso>/relatorios/). It also differentiates itself from siblings by naming the companion tools (buscar, obter_pagina, validar_citacoes) that surround this task.

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?

Explicitly tells the agent to perform the análise beforehand and to cross-reference inicial × contestação using buscar/obter_pagina, and mandates validar_citacoes before any literal quote. Routing is clear, but no 'when not to use' boundary or exclusion is given.

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

resumo_casoA

Memória do caso que sobrevive entre conversas (resumo.md na pasta). Sem conteudo: lê. Com conteudo: sobrescreve (leia antes e preserve o que ainda vale; a versão anterior fica em resumo.md.bak). Atualize ao final de sessões relevantes.

NameRequiredDescriptionDefault
casoYes
conteudoNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.9/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 overwrite semantics, the resumo.md.bak backup of the prior version, and the advice to read before overwriting and preserve what still matters. It omits anything about permissions or concurrent-write risk, which is the only gap.

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?

Three short sentences, front-loaded with the core concept (persistent memory) before the read/write mechanics and the usage nudge. Dense but every clause carries meaning; 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?

An output schema exists, so return values need not be described. For a file-backed read/overwrite tool with no annotations, the description covers the destructive behavior and backup path adequately; only the meaning of the required 'caso' argument remains thin.

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 coverage is 0%, so the description must compensate. It explains conteudo's dual semantics thoroughly (absent = read, present = overwrite), but the required 'caso' parameter is never defined beyond the implied 'na pasta' phrasing. Partial compensation for a 2-param tool.

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+resource: a persistent case memory stored as resumo.md in the case folder, with read-vs-overwrite behavior keyed on whether conteudo is supplied. It is clearly distinct from siblings like status_caso or listar_casos, though it never names an alternative explicitly.

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?

Gives concrete usage context: 'Atualize ao final de sessões relevantes' tells the agent when to call it, and the read/write branching tells it which mode applies. It stops short of naming sibling tools as alternatives, so it is clear context without explicit exclusions.

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

status_casoB

Estado detalhado do caso: cada PDF (preparado? quantas páginas OCR? preparação em andamento?) e o que falta indexar, com custo estimado.

NameRequiredDescriptionDefault
casoYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full disclosure burden. It adds useful context about what is inspected (PDF preparation state, OCR page counts, indexing backlog, cost estimate), which implicitly frames it as a non-mutating diagnostic read. However it never states read-only behavior, permission requirements, or whether the cost estimate is authoritative — meaningful gaps for a zero-annotation tool.

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?

One front-loaded sentence with the resource and scope up front and no filler. The parenthetical sub-clauses earn their place by naming the specific data points returned.

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?

An output schema exists, so exact return shape needn't be restated. But with no annotations, no usage routing against eleven siblings, and an undocumented sole parameter, the definition is only minimally complete for an agent deciding when to call it.

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

Parameters2/5

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

The single required parameter 'caso' has no schema description (0% coverage) and is never mentioned in the description — no identifier format, no name-vs-ID guidance. Since coverage is below 50%, the description was expected to compensate and does not.

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+resource ('Estado detalhado do caso') and enumerates the concrete outputs: per-PDF preparation state, OCR page counts, in-progress preparation, remaining-to-index items, and estimated cost. This distinguishes it from the summary-style sibling resumo_caso, though it never names that sibling explicitly.

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

Usage Guidelines2/5

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

No when-to-use guidance and no mention of alternatives such as resumo_caso (overview) or preparar_caso/indexar_caso (the mutating actions it reports on). The diagnostic intent is only implied by the reported fields; an agent gets no explicit trigger conditions or exclusions.

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

validar_citacoesA

Valida transcrições LITERAIS contra o texto real das páginas — use antes de qualquer relatório/petição. Cada item: {trecho, arquivo, pagina}. Vereditos: CONFIRMADA · QUASE (usa a passagem_real devolvida) · DIVERGENTE (número/data trocado — REJEITAR) · PÁGINA ERRADA (informa onde está de verdade) · NÃO ENCONTRADA (possível invenção — reler a fonte). Só valida citação textual; paráfrase deve ser conferida com obter_pagina.

NameRequiredDescriptionDefault
casoYes
citacoesYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does substantial work: it enumerates the five verdicts, tells the agent to consume the returned passagem_real on QUASE, to REJEITAR on DIVERGENTE, and warns that NÃO ENCONTRADA may indicate invention. It does not state cost, rate limits, or that the operation is purely read-only, which is the only real gap.

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?

Three dense sentences, front-loaded with the purpose and the pre-report workflow trigger, followed by the item shape and the verdict taxonomy. No filler or restatement of the tool name.

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?

An output schema exists, so return values needn't be explained, yet the verdict semantics are still spelled out because they drive the agent's next action. Only the 'caso' parameter's expected format/value is left unspecified, a minor gap for a two-parameter tool.

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 description coverage is 0%, so the description must compensate, and it does for the critical parameter: the item shape {trecho, arquivo, pagina} is documented nowhere in the schema (citacoes is an untyped array of open objects). The 'caso' parameter is only implicitly identified as the case handle, leaving one gap.

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 ('Valida transcrições LITERAIS contra o texto real das páginas') with an explicit scope limitation (textual citations only, not paraphrases). It also names the sibling obter_pagina as the tool for the out-of-scope case, so an agent can separate it from the other 11 siblings.

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?

Gives explicit timing ('use antes de qualquer relatório/petição') and an explicit exclusion plus alternative ('Só valida citação textual; paráfrase deve ser conferida com obter_pagina'). Both when-to-use and when-not-to-use are covered.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 12 tool updatesv0.1.0
    • First observedabrir_pagina
    • First observedbuscar
    • First observedcronologia
    • First observedindexar_caso
    • First observedindice_pecas
    • First observedlistar_casos
    • First observedobter_pagina
    • First observedpreparar_caso
    • First observedquadro_controversias
    • First observedresumo_caso
    • First observedstatus_caso
    • First observedvalidar_citacoes

TDQS

A3.7/5.0

Scored across 12 tools

Disambiguation4/5

Most tools target distinct actions: preparation/extraction (preparar_caso), indexing (indexar_caso), search (buscar), verification (obter_pagina, validar_citacoes), and report generation (quadro_controversias). Only indice_pecas vs cronologia overlap somewhat, since both describe the process's pieces (index vs date-ordered timeline), but the descriptions distinguish them adequately.

Naming Consistency4/5

All names use consistent lowercase snake_case in Portuguese with a clear domain suffix (_caso). The only deviation is mixed structure: some are verb-led (listar_casos, preparar_caso, validar_citacoes) while others are noun phrases (status_caso, cronologia, quadro_controversias), but the style remains predictable and readable.

Tool Count5/5

Twelve tools map cleanly onto a coherent legal-case workflow: list → prepare (OCR) → index → search → verify → report. Each tool earns its place with no obvious redundancy or filler.

Completeness4/5

The surface covers the full research lifecycle, from PDF extraction and indexing through search, page verification, citation validation, and .docx report generation. Minor gaps exist (no explicit case creation/deletion or editing of the summary/status artifacts beyond resumo_caso), but these are workable.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A local-first MCP server that ingests PDFs, extracts structure, and provides semantic search and sequential navigation tools for AI clients to query and learn from documents.
    10
    MIT