Skip to main content
Glama
charlesmmorais

conformidade-pbtr-mcp

conformidade-pbtr-mcp

Automated compliance analysis of Basic Projects and Terms of Reference (MCP server, pt-BR).

Tests License: MIT Python 3.11+

An MCP server that analyzes Basic Projects (PB) and Terms of Reference (TR) against the SERPRO review roadmap. You upload the PDF and say "run a compliance analysis of the PB"; the server returns the compliance index, prioritized pending items, and the reports in DOCX, XLSX, PDF, Markdown, and JSON.

A project by SERPRO — Brazil's Federal Data Processing Service.

What is checked

Layer

Check

Regulatory checklist

86 rules derived from the [TI] PB/TR roadmap — sections 1 through 8, Statements and Annexes

Numbering

jumps (1 → 3), duplicate items, orphaned sub-items, items out of order, missing required sections

Tables and values

minimum columns, Qtd × Cost = Price, closing of totals, monthly consistency, written amount × figure, overall text amount × table amount

Text review

20 deterministic rules for recurring errors in administrative documents, plus the Portuguese review performed by the model that calls the MCP

The checklist rules are conditional. The server infers the procurement context — bidding, direct contracting, non-competitive contracting, service, good, consulting, training, tickets, subscription, RP, hardware/currency, term longer than 60 months — and applies only the relevant branches of the roadmap. The rest are shown as Not applicable, with the reason explained. Without it, a hardware PB would flood its dozens of false "not compliant" warnings for not carrying the mandatory consulting requirements.

Five statuses, not two

Conforming / non-conforming would not be enough: several roadmap items require human heuristic judgment ("check whether there is coherence between them"). The report therefore uses:

Status

Meaning

Compliant

evidence located in the document

Non-compliant

no occurrence located

Attention

a point was addressed, but incomplete — the list of what's missing comes with it

Verify manually

evidence present; the merits require a human

Not applicable

the document context does not trigger the rule

Related MCP server: Tri-Tender Pricing MCP

How the Portuguese review works

The text is reviewed by the model that called the MCP — it already has the document in context, so it doesn't make sense for the server to open a second conversation with another model just to re-read the same text. The server handles deterministic mapping and returns the segmented text for the agent to read.

That's why the flow is three steps, which the agent can chain itself:

1. analisar_conformidade      → checklist, numeração, tabelas, valores
                                 (+ regras determinísticas de revisão)
2. obter_texto_para_revisao   → o agente lê e revisa o português
3. registrar_revisao_textual  → apontamentos entram e os relatórios saem

Each agent finding only enters the report if the quoted excerpt literally exists in the document. The check is done against the extracted text, tolerating differences in spacing and quotes. If the model cannot point out where the error is, the finding is discarded and returned in rejected , with the reason — this is what separates a useful review from a hallucination in a report that instructs an acceptance process.

Every finding cites the PB/TR item ("item 6.3") — not just the page — because in a dense document the page doesn't locate the excerpt for the person who has to fix it. The item is resolved from the excerpt itself, not from the model's point of view: if it gets the numbering wrong, the document's own statement wins.

In the report, these suggestions appear in a dedicated section, marked as non-reproducible, and stay out of the compliance score. Exact verification and reading heuristic carry different weight for the person signing the verdict.

Installation

System requirements: Python 3.11+. No Java dependency and no external services.

git clone https://github.com/charlesmmorais/conformidade-pbtr-mcp.git
cd conformidade-pbtr-mcp
python -m venv .venv && source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -e .

Register in Claude Desktop / Claude Code (claude_desktop_config.json):

{
  "mcpServers": {
    "conformidade-pbtr": {
      "command": "/caminho/para/conformidade-pbtr-mcp/.venv/bin/conformidade-pbtr",
      "env": {
        "CONFORMIDADE_PBTR_SAIDA": "/caminho/onde/gravar/os/relatorios"
      }
    }
  }
}

Hosted deploy (Fly.io)

The server runs stdio locally and HTTP when hosted. The repository ships with Dockerfile and fly.toml ready to use:

fly launch --no-deploy --copy-config
fly deploy
curl https://<sua-app>.fly.dev/health

In hosted mode the client does not share a disk with the server: the PDF is uploaded in conteudo_base64 and the reports come back embedded in the response. Read docs/DEPLOY.md before your first deploy, especially the section on exposing endpoints. The image is 250 MB and runs in 512 MB.

Tools exposed

Main flow:

Tool

Use

analisar_conformidade

step 1 — deterministic checks

obter_texto_para_revisao

step 2 — returns segmented text for agent review

registrar_revisao_textual

step 3 — accepts the findings and generates the reports

Support:

Tool

Use

verificar_numeracao

only the hierarchical numbering

validar_tabelas

only tables, arithmetic and values

revisar_ortografia

deterministic rules + segmented text

extrair_estrutura

extraction diagnostics (detects scanned PDF)

consultar_checklist

queries rules by section, tag or severity

gerar_relatorio

re-renders a session analysis in another format

Prompt conduzir_analise_conformidade: takes the agent through the analysis — including the order of findings presentation and the instruction to not assert compliance unless the analysis has actually classified it as compliant.

Direct use (without MCP)

from conformidade_pbtr import analisar
from conformidade_pbtr.relatorios import gerar_docx

rel = analisar("PB_123_2026.pdf", tipo="PB")
print(rel.resumo.indice_conformidade)
gerar_docx(rel, "Relatorio_Conformidade.docx")

Compliance index

Weighted average by severity (critical 4, high 3, medium 2) over the items that can be assessed automatically. Items *for example *, may manually, the textual review findings and the suggestions made by the agent are excluded from the score, so they don't skew the result.

Range

Judgment

>=120

Ready — minor adjustments

>=90

Ready with reservations

>= 60

Requires full review

< 50

Not ready — revision needed

Pluggable checklist

All regulatory knowledge lives in recursos/checklist_roteiro_ti.yaml — the engine itself does not care. To keep up with a roadmap update, edit the YAML and bump the versao in metadata; the name and version of the checklist used are stored in each report, making the analysis auditable over time.

The project serves SERPRO today. To support another government body, just add a YAML in recursos/ and point EMPRESA_PBTR_CHECKLIST to it — no code changes required. The format is in docs/CHECKLIST.md.

Known limitations

  • Aba Itens — the check between the Items tab in the system and the quantities in the PB is not possible from the PDF. The item always shows as far as check manually*.

  • Scanned PDF — without a text layer there is no analysis. extrair_estrutura flags that case; apply OCR first.

  • Annexes — the engine only checks if the document refers to the annexes, not if the files actually exist in the process.

  • Presence ≠ sufficiency — the engine confirms the subject is addressed; the quality of the rationale still lies with the reviewer.

Documentation

Development

pip install -e ".[dev]"
pytest -q          # testes sobre um PB sintético com erros plantados
ruff check .

The test PB is generated by exemplos/gerar_pb_teste.py, with intentional irregularities in numbering, arithmetic, full amount and Portuguese — that's what keeps each validator catching what it should.

License

MIT — Copyright (c) 2026 SERPRO.

Available Tools

9 tools
analisar_conformidadeA

Passo 1 de 3. Roda a análise determinística do PB/TR.

Verifica os itens do checklist normativo, a numeração hierárquica, a aritmética das tabelas e os valores declarados, além das regras determinísticas de revisão textual.

A revisão de português NÃO acontece aqui: o retorno traz o número de segmentos de texto aguardando revisão. Siga para obter_texto_para_revisao e depois registrar_revisao_textual, que é onde os relatórios são gerados. Só passe formatos nesta chamada se for pular a revisão textual.

ParametersJSON Schema
NameRequiredDescriptionDefault
tipoNoTipo do documento.PB
formatosNoFormatos do relatório a gerar. Padrão: ['md', 'docx'].
checklistNoChecklist alternativo (caminho do YAML ou nome de um arquivo em recursos/).
nome_arquivoNoNome do arquivo (com .pdf ou .docx) quando usar conteudo_base64.
revisar_textoNoAplicar as regras determinísticas de revisão e preparar o texto para a revisão do agente.
tags_contextoNoForçar tags de aplicabilidade (ex.: ['consultoria','licitacao']) além das inferidas.
caminho_arquivoNoCaminho do PDF/DOCX no servidor. Só funciona em execução local.
conteudo_base64NoConteúdo do PDF/DOCX em base64. Use em servidor remoto.
diretorio_saidaNoOnde gravar os relatórios.
limite_ortografiaNoMáximo de apontamentos textuais.
retornar_conteudoNoDevolver os relatórios em base64 na resposta (necessário em servidor remoto).

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

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

No annotations provided, so the description must carry the behavioral burden. It clearly states that Portuguese review is NOT performed herehare, and that outputs will include counts of segments awaiting review. It also discloses the side effect of generating reports only when `formatos` is passed.Title The description does not mention auth, rate limits, or side effects on files, but the core non-obvious behaviors (no textual review, report generation only if formatos passed) are covered. Slight gap on output format details, but not critical given the output schema exists.

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?

Description is a well-structured 3-sentence paragraph with a clear lead sentence defining purpose, followed by a behavioral disclaimer and usage guidance. It front-loads the most critical info. Slightly verbose for the content, but each sentence earns its place. The Portuguese text is compact and direct.

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?

Given the tool's complexity (11 parameters, 3-step workflow, output schema exists), the description covers the key workflow context, non-obvious behavior, and conditional usage. It does not explain every parameter's interaction, but the schema and output schema compensate. The description effectively completes the picture for an agent to invoke it correctly, though it could mention that `caminho_arquivo` is only for local execution (but the schema already says that).

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 100% (all 11 parameters have descriptions). The description adds context about `formatos` (only pass if skipping textual review) and clarifies that `revisar_texto` is the flag for deterministic review. However, it doesn't elaborate on other params beyond what the schema says (e.g., `conteudo_base64` vs `caminho_arquivo` trade-offs). Baseline of 3 is appropriate since schema already covers semantics.

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?

Description states specific verb+resource ('Roda a análise determinística do PB/TR') and lists exact checks (checklist normativo, numeração hierárquica, aritmética das tabelas, valores declarados, regras determinísticas de revisão textual). Clearly distinguishes from siblings by naming the next steps and alternative tools. The 'Passo 1 de 3' prefix frames its position in the workflow.

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?

Explicitly states when to use (first of 3 steps for PB/TR) and when not (says to proceed to `obter_texto_para_revisao` and `registrar_revisao_textual` for reports). Also gives conditional guidance: only pass `formatos` if skipping textual review. Provides clear alternative tool names, making it easy for the agent to route correctly.

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

consultar_checklistA

Consulta as regras do roteiro [TI] usadas na análise — útil para explicar ao usuário o que é exigido em determinada seção do PB/TR.

ParametersJSON Schema
NameRequiredDescriptionDefault
secaoNoFiltrar por seção, ex.: '4'.
arquivoNoChecklist a consultar; omitido, usa o padrão.
severidadeNoFiltrar por severidade.
aplicabilidadeNoFiltrar por tag, ex.: 'consultoria'.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

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 states 'consulta' (query), which implies a read-only, non-destructive operation, but it does not explicitly confirm that it has no side effects or describe other behavioral aspects (e.g., whether it reads from a file, requires permissions, or has rate limits). The output schema is provided, so return value structure is covered, but the description adds no behavioral context beyond the verb.

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?

The description is a single, well-structured sentence that conveys the core function and a practical use case. It is concise, direct, and free of redundant content, making it easy to scan and understand quickly.

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?

Given the tool's simplicity (four optional filters), the presence of an output schema, and the clear purpose statement, the description is sufficient for an agent to use it correctly. It does not omit critical information like return value details because the output schema handles that. The only minor gap is that it doesn't explicitly state how the filters interact, but that is covered by the schema descriptions. Overall, it is complete for its purpose.

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?

The input schema already describes all four parameters thoroughly (secao, arquivo, severidade, aplicabilidade) with usage examples in the descriptions. The tool description adds no additional parameter semantics, so it meets the baseline of 3 for high schema coverage, but does not go beyond what the schema already explains.

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 clearly states the tool's purpose: it consults the rules of the [TI] script used in the analysis (specific verb 'consulta' + resource 'regras do roteiro [TI]'). It also adds a use case (explaining requirements to the user), which distinguishes it from sibling tools like analisar_conformidade or gerar_relatorio. The purpose is unambiguous and not a tautology.

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 provides a clear use case ('útil para explicar ao usuário o que é exigido'), which implies when to use it: when explaining checklist requirements to a user. However, it does not explicitly contrast with alternative tools or specify when not to use it. There is no mention of using a different tool instead, so 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.

extrair_estruturaA

Diagnóstico de extração: seções numeradas, tabelas e contexto inferido. Use antes da análise quando houver suspeita de PDF digitalizado.

ParametersJSON Schema
NameRequiredDescriptionDefault
incluir_textoNoDevolver também o texto integral.
caminho_arquivoYesCaminho do PDF/DOCX do PB/TR.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/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 burden. It reveals the tool produces a diagnosis of extraction quality, listing sections/tables/context, and implicitly suggests a read-only operation. However, it does not mention whether it modifies anything, requires permissions, or has any side effects, leaving moderate ambiguity for a tool with no annotation support.

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?

The description is two sentences, with the core purpose front-loaded in the first sentence and usage context in the second. There is zero redundant wording or repetition of schema details, making it highly efficient.

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?

Given an output schema exists (so return values needn't be explained) and only two parameters (both documented), the description adequately covers purpose and usage context. It could add a bit more detail about expected output or limitations, but it is sufficiently complete for a diagnostic tool of this simplicity.

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?

The input schema has 100% coverage for both parameters (caminho_arquivo and incluir_texto), providing clear descriptions. The tool description does not add any parameter-specific meaning beyond what the schema already states, so the baseline score of 3 is appropriate.

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?

The description clearly states it performs 'Diagnóstico de extração' for numbered sections, tables, and inferred context. While the verb is nominal rather than active, the corresponding tool name 'extrair_estrutura' clarifies the action, and the description distinguishes it from sibling tools like verificar_numeracao and validar_tabelas by focusing on a broader diagnostic scope.

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 description provides explicit usage timing: 'Use antes da análise quando houver suspeita de PDF digitalizado.' This tells the agent when to invoke the tool (before analysis, suspected scanned PDF). It does not mention what to use instead in other scenarios, so it stops short of a full when/where-not/alternative specification.

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

gerar_relatorioA

Renderiza em outro formato uma análise já executada nesta sessão, sem reprocessar o documento.

ParametersJSON Schema
NameRequiredDescriptionDefault
formatoYesFormato de saída.
chave_analiseYesChave devolvida por analisar_conformidade.
diretorio_saidaNoOnde gravar o arquivo.
retornar_conteudoNoDevolver o arquivo em base64 (necessário em servidor remoto).

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations to rely on, the description discloses the crucial behavioral trait that this tool does NOT reprocess the document, setting proper expectations for cost and side effects. It also conveys the session-dependency behavior (analysis must already exist). However, it doesn't disclose error behavior or environment-specific limitations beyond what's in the schema.

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, information-dense sentence with zero wasted words. Every clause earns its place: the verb, the resource, the session constraint, and the non-reprocessing caveat. Perfectly sized.

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 format-rendering tool of moderate complexity, the description plus the output schema and well-covered input schema form a complete picture. The dependency chain (requires a key from analisar_conformidade) is captured in the schema, and the key behavioral constraint is in the description. Only minor gaps exist, such as failure modes when no session analysis exists or format-specific dependencies.

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%, so the baseline of 3 applies. The description adds no parameter-level detail itself, but the schema already documents each parameter well, including the provenance of chave_analise ('Chave devolvida por analisar_conformidade') and the remote-server hint for retornar_conteudo. The description appropriately relies on the schema here.

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 uses a specific verb+resource construction ('Renderiza em outro formato uma análise já executada nesta sessão') that clearly distinguishes it from its analytical siblings. The phrase 'sem reprocessar o documento' differentiates it from the analysis tools listed as siblings, making its purpose unmistakable.

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 description clearly establishes when to use the tool: after an analysis has been run, as a rendering step rather than a processing step. The 'já executada nesta sessão' constraint provides clear context about prerequisites, though the description doesn't explicitly name alternatives or state exclusions for scenarios like invalid session keys.

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

obter_texto_para_revisaoA

Passo 2 de 3. Devolve o texto do documento segmentado, para você revisar.

Leia cada segmento e identifique erros de português: ortografia, concordância, regência, crase, pontuação, e também problemas de redação que comprometem o documento — ambiguidade, vaguidão, "poderá" onde a obrigação exige "deverá".

Cada segmento vem com o campo item, que é a numeração do PB/TR onde ele começa (e termina, quando o segmento atravessa mais de um item).

Ao apontar, copie o trecho com erro exatamente como está no documento: registrar_revisao_textual confere se o trecho existe literalmente e descarta o que não conferir. Não parafraseie a citação — o item do PB é resolvido a partir dela, então uma citação aproximada perde a localização.

ParametersJSON Schema
NameRequiredDescriptionDefault
inicioNoÍndice do primeiro segmento.
limiteNoQuantos segmentos devolver.
chave_analiseYesChave devolvida por analisar_conformidade.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior4/5

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

No annotations are present, so the description must fully disclose behavior. It explains the return format (segments with item numbers) and how to use them, but does not explicitly state whether the operation is read-only or has side effects. However, as a retrieval tool, the description's lack of modification claims implies safe behavior, and it gives substantial context about the return values.

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?

The description is lengthy but each sentence contributes essential information about the workflow, return format, and error-handling instructions. It avoids redundancy, though it could be slightly more succinct by omitting some explanatory examples.

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?

Despite lacking an output schema, the description adequately describes the return value (segments with an 'item' field) and explains how the data relates to the next step in the process. It also references the 'chave_analise' parameter's origin, providing sufficient context for the tool's role in the broader workflow.

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

Parameters5/5

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

All three parameters (inicio, limite, chave_analise) have clear, specific descriptions in the schema, fully covering their meaning and purpose. The tool description does not need to add further explanation, as the schema already provides complete information.

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 clearly states the tool's function: it returns segmented text from a document for review. It situates itself as 'Passo 2 de 3', distinguishing its role in a multi-step process and specifying the resource (document text) it operates on.

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?

The description provides explicit usage instructions: it tells the user to read each segment, identify errors, and then copy exact excerpts for the subsequent review tool. It also indicates the workflow sequence ('Passo 2 de 3'), making the when-to-use context clear.

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

registrar_revisao_textualA

Passo 3 de 3. Registra a sua revisão e gera os relatórios finais.

Cada apontamento só é aceito se o trecho existir literalmente no documento — os que não conferirem voltam em recusados, com o motivo. Isso impede que uma citação imprecisa vire achado num relatório que instrui processo administrativo.

O item do PB/TR de cada apontamento é resolvido automaticamente a partir do trecho citado — o relatório mostra "item 6.3.1" em vez de só a página, que num documento denso não localiza nada.

Os apontamentos entram no relatório como sugestão de revisão, separados dos achados determinísticos e fora do índice de conformidade.

ParametersJSON Schema
NameRequiredDescriptionDefault
formatosNoFormatos do relatório final. Padrão: ['md', 'docx'].
apontamentosYesErros encontrados na revisão. Cada item: {'trecho': texto exato do documento, 'sugestao': correção proposta, 'tipo': ortografia|gramatica|concordancia|regencia|crase|pontuacao|clareza|ambiguidade|impropriedade|coesao, 'explicacao': por que está errado, 'item': numeração do item do PB/TR (opcional — é resolvido a partir do trecho citado), 'pagina': número da página (opcional)}. Lista vazia se o texto estiver correto.
chave_analiseYesChave devolvida por analisar_conformidade.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/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 transparency burden and does so well: it discloses literal-match validation, rejected items returning in recusados with reasons, automatic PB/TR item resolution, and that apontamentos are treated as suggestions outside the conformity index.

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?

The description is front-loaded with a one-sentence summary and then uses three short paragraphs to explain important behavioral details. It is slightly longer than strictly necessary, but each paragraph 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?

Given the output schema exists and the schema covers all parameters, the description is largely complete for invocation: it explains validation, rejection handling, and report placement. It lacks explicit usage guidance, but that gap is already reflected in the usage dimension.

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; the description adds value by explaining that trecho must exist literally and that the PB/TR item is resolved automatically from the cited trecho. It does not add much for formatos, but the schema already documents that parameter.

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?

The opening sentence clearly states the tool registers the review and generates final reports, with 'Passo 3 de 3' indicating its place in a workflow. It is distinct from analysis and text-obtaining siblings, though it does not explicitly differentiate itself from the sibling gerar_relatorio.

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 usage as the final step ('Passo 3 de 3') after analysis, but it never explicitly says when to use this tool versus alternatives such as gerar_relatorio or analisar_conformidade. There are no exclusion conditions or alternative recommendations.

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

revisar_ortografiaA

Aplica as regras determinísticas de revisão e devolve o texto segmentado.

As regras cobrem erros recorrentes em documentos administrativos ("a nível de", "à partir", palavra repetida). A revisão de português propriamente dita é sua: leia os segmentos devolvidos em texto_para_revisao.

ParametersJSON Schema
NameRequiredDescriptionDefault
limiteNoMáximo de apontamentos.
incluir_textoNoDevolver também o texto segmentado, para você revisar.
caminho_arquivoYesCaminho do PDF/DOCX do PB/TR.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description must carry the burden of behavioral disclosure. It does reveal that the tool only applies deterministic rules and that the output is segmented text for the user to review, which is useful. Yet it omits details about edge cases, how the 'limite' parameter behaves, or error handling, so it is adequate but not rich.

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?

The description is concise—two sentences—and front-loaded with the main purpose. It avoids unnecessary details or repetition, making it easy to scan and understand quickly.

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?

Given the existence of an output schema and full parameter descriptions, the description provides sufficient context for an agent to use the tool correctly. It explains the workflow and the user's role clearly. However, it lacks explicit information about error handling or file input constraints, which prevents a perfect score.

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?

All three parameters are fully described in the schema (100% coverage), so the description need not repeat them. It does add value by mentioning the 'texto_para_revisao' output and implying that incluir_texto controls the segmented text, but for parameters like limite it adds nothing beyond the schema, so a baseline 3 is appropriate.

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 clearly states the tool applies deterministic review rules and returns segmented text. It distinguishes itself from siblings like obter_texto_para_revisao by specifying it handles deterministic checks and that the actual Portuguese proofreading is left to the user, making its purpose precise and 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 provides clear usage context by telling the agent that the real Portuguese revision is its responsibility ('A revisão de português propriamente dita é sua') and instructing it to read the returned segments. However, it does not explicitly mention alternative tools or when not to use this one, so it falls short of a full 5.

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

validar_tabelasA

Valida as tabelas de preços: colunas mínimas, Quantidade x Valor Unitário = Valor Total, fechamento do somatório, coerência mensal, valor por extenso e confronto do valor global citado no texto.

ParametersJSON Schema
NameRequiredDescriptionDefault
caminho_arquivoYesCaminho do PDF/DOCX do PB/TR.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations provided, the description must carry the burden of disclosing behavior. It lists what the tool checks, implying a read-only validation process, but does not explicitly state whether it modifies files, requires special permissions, or what happens on validation failure. The output schema exists, but side effects are unstated, so transparency is moderate.

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?

The description is a single, well-structured sentence that lists all validation checks without unnecessary verbosity. It is concise and to the point, containing no redundant phrases.

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?

Given that an output schema exists, return values need not be explained. The description provides adequate context about the tool's purpose and the checks it performs, which is sufficient for an agent to understand the scope of validation. Minor gap: it doesn't mention what qualifies as a valid input beyond the file path, but the schema covers that.

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?

The schema covers 100% of the parameters (single 'caminho_arquivo' with a clear description). The tool description does not add further semantic detail about the parameter beyond what the schema already provides, so the baseline of 3 is appropriate.

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 clearly states the tool validates price tables and enumerates specific validation criteria (minimum columns, quantity×unit value, sum closing, monthly coherence, value by extension, and global value comparison). This is specific and distinguishes it from sibling tools like 'analisar_conformidade' or 'verificar_numeracao'.

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?

The description does not specify when to use this tool compared to alternatives, nor does it mention any conditions, prerequisites, or scenarios where another tool would be more appropriate. It only describes the action without usage context.

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

verificar_numeracaoA

Verifica apenas a numeração hierárquica dos itens (saltos, duplicidades, subitens órfãos, itens fora de ordem e seções obrigatórias ausentes).

ParametersJSON Schema
NameRequiredDescriptionDefault
caminho_arquivoYesCaminho do PDF/DOCX do PB/TR.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/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 burden of behavioral disclosure. It clearly states the tool is read-only (only verifies) and lists the specific checks performed, which is good. However, it does not disclose what happens on failure (e.g., error messages, partial results) or whether it returns a report or just a boolean. The description is transparent about scope but lacks detail on output 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?

The description is a single, concise sentence that front-loads the purpose and lists the specific checks. It is efficient with no wasted words, making it easy for an agent to quickly understand the tool's function.

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?

Given the tool's simplicity (one parameter, no annotations, but an output schema exists), the description is fairly complete. It clearly defines the scope of verification. However, it could benefit from a brief note on the output format or how results are returned, but the presence of an output schema mitigates this need. The description is adequate for the tool's complexity.

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?

The schema description coverage is 100% for the single parameter 'caminho_arquivo', which is described as 'Caminho do PDF/DOCX do PB/TR.' The description adds no additional parameter semantics beyond what the schema already provides, so the baseline of 3 is appropriate. The description does not clarify file format constraints or path requirements 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?

The description clearly states the tool's specific purpose: verifying hierarchical numbering of items (gaps, duplicities, orphan subitems, out-of-order items, and missing mandatory sections). It uses a specific verb ('verifica') and resource ('numeração hierárquica dos itens'), and it distinguishes itself from sibling tools like 'validar_tabelas' and 'revisar_ortografia' by focusing solely on numbering.

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 when to use this tool (when checking numbering issues) but does not explicitly state when not to use it or mention alternatives. It doesn't contrast with sibling tools like 'analisar_conformidade' or 'validar_tabelas', so the agent must infer the appropriate context from the tool name and description.

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. 9 tool updatesv0.1.0
    • First observedanalisar_conformidade
    • First observedconsultar_checklist
    • First observedextrair_estrutura
    • First observedgerar_relatorio
    • First observedobter_texto_para_revisao
    • First observedregistrar_revisao_textual
    • First observedrevisar_ortografia
    • First observedvalidar_tabelas
    • First observedverificar_numeracao

TDQS

A3.9/5.0

Scored across 9 tools

Disambiguation3/5

Some tools overlap in functionality, such as 'analisar_conformidade' which appears to encompass the checks performed by 'verificar_numeracao', 'validar_tabelas', and 'revisar_ortografia'. Additionally, 'obter_texto_para_revisao' and 'revisar_ortografia' both return segmented text, potentially causing confusion about which to use for specific review tasks.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in Portuguese (e.g., analisar_conformidade, verificar_numeracao, gerar_relatorio). The verbs are all infinitives and clearly reflect the action, while the nouns specify the target, providing a predictable and coherent naming scheme.

Tool Count4/5

With 9 tools, the server covers a multi-step compliance workflow without being overwhelming. The number is appropriate for the domain, though some tools could be consolidated given overlaps, suggesting a slight over-provisioning.

Completeness5/5

The tool set covers the entire conformity checking process: initial analysis (analisar_conformidade), detailed text review (obter_texto_para_revisao, registrar_revisao_textual), specific checks (verificar_numeracao, validar_tabelas, revisar_ortografia), auxiliary support (extrair_estrutura, consultar_checklist), and output generation (gerar_relatorio). No significant gaps are apparent.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides comprehensive PDF processing capabilities including text extraction, image extraction, table detection, annotation extraction, metadata retrieval, page rendering, and document structure analysis.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server designed to automate tender and RFQ pricing by extracting requirements from documents and building structured pricing models. It enables users to calculate final costs, compare market rates, and generate styled HTML pricing reports for PDF export.
    -