conformidade-pbtr-mcp
conformidade-pbtr-mcp
Automatisierte Konformitätsanalyse von Basisprojekten und Leistungsbeschreibungen (MCP-Server, pt-BR).
MCP-Server, der Basisprojekte (PB) und Leistungsbeschreibungen (TR) gegen den Analyseleitfaden des SERPRO prüft. Sie senden das PDF und sagen "Konformitätsanalyse des PB durchführen"; der Server liefert den Konformitätsindex, die priorisierten offenen Punkte und die Berichte als DOCX, XLSX, PDF, Markdown und JSON.
Projekt der SERPRO — Serviço Federal de Processamento de Dados.
Was geprüft wird
Ebene | Prüfung |
Normative Checkliste | 86 Regeln aus dem Leitfaden |
Nummerierung | Sprünge (5.1 → 5.3), doppelte Einträge, verwaiste Unterpunkte, nicht sortierte Einträge, fehlende Pflichtabschnitte |
Tabellen und Werte | Mindestspalten, |
Textrevision | 20 deterministische Regeln für wiederkehrende Fehler in Verwaltungsdokumenten, plus die Portugiesisch-Revision durch das Modell, das den MCP aufruft |
Die Regeln der Checkliste sind bedingt. Der Server leitet den Kontext der Beschaffung ab — Ausschreibung, Direktvergabe, Unzumutbarkeit, Dienstleistung, Ware, Beratung, Schulung, Tickets, Abonnement, ARP, Hardware/Wechselkurs, Laufzeit über 60 Monate — und wendet nur die relevanten Zweige des Leitfadens an. Die übrigen erscheinen als Nicht zutreffend, mit Angabe des Grunds. Ohne dieses Vorgehen würde ein Hardware-PB dutzende falsche "nicht konform" erhalten, weil die Pflichtbegründungen für Beratung fehlen.
Fünf Status, nicht zwei
konform / nicht konform wäre unzureichend: Mehrere Punkte des Leitfadens
erfordern menschliches Urteilsvermögen ("prüfen, ob Kohärenz zwischen ihnen
besteht"). Der Bericht verwendet:
Status | Bedeutung |
Konform | Hinweis im Dokument gefunden |
Nicht konform | kein Vorkommen gefunden |
Achtung | Thema behandelt, aber unvollständig — die Liste des Fehlenden folgt |
Manuell prüfen | Hinweis vorhanden; die inhaltliche Bewertung erfordert menschliches Auge |
Nicht zutreffend | Der Dokumentkontext löst die Regel nicht aus |
Related MCP server: Tri-Tender Pricing MCP
Wie die Portugiesisch-Revision funktioniert
Den Text überprüft das Modell, das den MCP aufgerufen hat — es hat das Dokument bereits im Kontext, daher ergibt es keinen Sinn, dass der Server eine zweite Konversation mit einem anderen Modell eröffnet, um denselben Text erneut zu lesen. Der Server kümmert sich um das Deterministische und liefert den Text segmentiert für den Agenten zum Lesen.
Daraus ergibt sich der dreistufige Ablauf, den der Agent selbstständig verkettet:
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 saemJeder Hinweis des Agenten gelangt nur dann in den Bericht, wenn die zitierte
Textstelle tatsächlich im Dokument vorhanden ist. Die Überprüfung erfolgt
gegen den extrahierten Text, wobei Unterschiede bei Leerzeichen und
Anführungszeichen toleriert werden. Wenn das Modell nicht angeben kann, wo der
Fehler liegt, wird der Hinweis verworfen und in recusados mit Begründung
zurückgegeben — das unterscheidet eine nützliche Revision von einer Halluzination
in einem Bericht, der ein Verwaltungsverfahren anleitet.
Jeder Befund zitiert den PB/TR-Punkt ("Punkt 6.3.1"), nicht nur die Seite — in einem dichten Dokument lokalisiert die Seite den Textabschnitt für den, der korrigieren soll, nicht. Der Punkt wird aus dem Zitat aufgelöst, nicht aus dem, was das Modell angibt: Wenn es die Nummerierung falsch angibt, gilt das, was das Dokument sagt.
Im Bericht erscheinen diese Vorschläge in einem eigenen Abschnitt, als nicht reproduzierbar markiert, und bleiben außerhalb des Konformitätsindex. Exakte Prüfung und Lesevorschlag haben unterschiedliche Gewichte für den, der das Gutachten unterzeichnet.
Installation
Einzige Voraussetzung: Python 3.11+. Es gibt keine Java-Abhängigkeit und keinen externen Dienst.
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 .Registrierung 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"
}
}
}
}Gehostetes Deployment (Fly.io)
Der Server spricht stdio lokal und HTTP, wenn gehostet. Das Repository
enthält fertige Dockerfile und fly.toml:
fly launch --no-deploy --copy-config
fly deploy
curl https://<sua-app>.fly.dev/healthIm gehosteten Modus teilt der Client keinen Datenträger mit dem Server: Das PDF
wird in conteudo_base64 hochgeladen und die Berichte kommen eingebettet in der
Antwort zurück. Lesen Sie docs/DEPLOY.md vor dem ersten
Deployment — insbesondere den Abschnitt zur Offenlegung des Endpunkts. Das Image
hat ~250 MB und läuft mit 512 MB.
Exponierte Tools
Hauptablauf:
Tool | Verwendung |
| Schritt 1 — deterministische Prüfungen |
| Schritt 2 — liefert den segmentierten Text für die Agentenprüfung |
| Schritt 3 — nimmt Hinweise entgegen und erstellt die Berichte |
Hilfstools:
Tool | Verwendung |
| nur die hierarchische Nummerierung |
| nur Tabellen, Arithmetik und Werte |
| deterministische Regeln + segmentierter Text |
| Diagnose der Extraktion (erkennt gescannte PDFs) |
| Regeln abfragen, nach Abschnitt, Tag oder Schweregrad |
| Analyse einer Sitzung in einem anderen Format neu rendern |
Prompt conduzir_analise_conformidade: Leitfaden für die Durchführung der
Analyse durch den Agenten, einschließlich der Reihenfolge der Darstellung der
Befunde und der Anweisung, keine Konformität zu behaupten, ohne dass die Analyse
sie als solche eingestuft hat.
Direkte Nutzung (ohne 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")Konformitätsindex
Gewichteter Durchschnitt nach Schweregrad (kritisch 4, hoch 3, mittel 2) über die automatisch bewertbaren Punkte. Punkte mit Nicht zutreffend, Manuell prüfen, die Hinweise zur Textrevision und die Vorschläge des Agenten bleiben außerhalb der Berechnung, um die Note nicht zu verzerren.
Bereich | Lesart |
≥ 90 | Geeignet — punktuelle Anpassungen |
≥ 75 | Geeignet mit Vorbehalten |
≥ 50 | Erfordert substanzielle Überarbeitung |
< 50 | Nicht geeignet — Überarbeitung erforderlich |
Steckbare Checkliste
Das gesamte normative Wissen liegt in recursos/checklist_roteiro_ti.yaml — der
Motor kennt keine Norm. Um eine Leitfadenrevision zu begleiten, bearbeiten Sie
das YAML und erhöhen Sie die versao in metadata; Name und Version der
verwendeten Checkliste werden in jedem Bericht gespeichert, was die Analyse über
die Zeit hinweg auditierbar macht.
Das Projekt bedient derzeit das SERPRO. Die Unterstützung einer anderen Behörde
bedeutet, ein YAML in recursos/ hinzuzufügen und CONFORMIDADE_PBTR_CHECKLIST
darauf zu verweisen — keine Codeänderung. Das Format ist in
docs/CHECKLIST.md beschrieben.
Bekannte Grenzen
Registerkarte Itens — der Abgleich zwischen der Registerkarte Itens des Systems und den Mengen des PB ist anhand des PDFs nicht möglich. Der Punkt wird immer als Manuell prüfen ausgegeben.
Gescanntes PDF — ohne Textebene gibt es keine Analyse.
extrair_estruturaweist darauf hin; wenden Sie vorher OCR an.Anhänge — es wird geprüft, ob das Dokument die Anhänge zitiert, nicht ob die Dateien im Verfahren existieren.
Vorhandensein ≠ Angemessenheit — der Motor bestätigt, dass das Thema behandelt wurde; die inhaltliche Bewertung der Begründung bleibt dem Gutachter überlassen.
Dokumentation
docs/MANUAL.md— Mikro-Benutzerhandbuch für die Analysedocs/ARQUITETURA.md— Projektentscheidungen, Datenmodell und Roadmapdocs/CHECKLIST.md— YAML-Format und wie man gute Auslöser schreibtdocs/DEPLOY.md— Deployment auf Fly.io, Remote-Modus und UmgebungsvariablenCONTRIBUTING.md— wie man beiträgt
Entwicklung
pip install -e ".[dev]"
pytest -q # testes sobre um PB sintético com erros plantados
ruff check .Das Test-PB wird von exemplos/gerar_pb_teste.py erzeugt, mit absichtlichen
Fehlern bei Nummerierung, Arithmetik, Betrag in Worten und Portugiesisch — das
stellt sicher, dass jeder Validator weiterhin das findet, was er finden soll.
Lizenz
MIT — Copyright (c) 2026 SERPRO.
Available Tools
9 toolsanalisar_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.
| Name | Required | Description | Default |
|---|---|---|---|
| tipo | No | Tipo do documento. | PB |
| formatos | No | Formatos do relatório a gerar. Padrão: ['md', 'docx']. | |
| checklist | No | Checklist alternativo (caminho do YAML ou nome de um arquivo em recursos/). | |
| nome_arquivo | No | Nome do arquivo (com .pdf ou .docx) quando usar conteudo_base64. | |
| revisar_texto | No | Aplicar as regras determinísticas de revisão e preparar o texto para a revisão do agente. | |
| tags_contexto | No | Forçar tags de aplicabilidade (ex.: ['consultoria','licitacao']) além das inferidas. | |
| caminho_arquivo | No | Caminho do PDF/DOCX no servidor. Só funciona em execução local. | |
| conteudo_base64 | No | Conteúdo do PDF/DOCX em base64. Use em servidor remoto. | |
| diretorio_saida | No | Onde gravar os relatórios. | |
| limite_ortografia | No | Máximo de apontamentos textuais. | |
| retornar_conteudo | No | Devolver os relatórios em base64 na resposta (necessário em servidor remoto). |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| secao | No | Filtrar por seção, ex.: '4'. | |
| arquivo | No | Checklist a consultar; omitido, usa o padrão. | |
| severidade | No | Filtrar por severidade. | |
| aplicabilidade | No | Filtrar por tag, ex.: 'consultoria'. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| incluir_texto | No | Devolver também o texto integral. | |
| caminho_arquivo | Yes | Caminho do PDF/DOCX do PB/TR. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| formato | Yes | Formato de saída. | |
| chave_analise | Yes | Chave devolvida por analisar_conformidade. | |
| diretorio_saida | No | Onde gravar o arquivo. | |
| retornar_conteudo | No | Devolver o arquivo em base64 (necessário em servidor remoto). |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| inicio | No | Índice do primeiro segmento. | |
| limite | No | Quantos segmentos devolver. | |
| chave_analise | Yes | Chave devolvida por analisar_conformidade. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| formatos | No | Formatos do relatório final. Padrão: ['md', 'docx']. | |
| apontamentos | Yes | Erros 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_analise | Yes | Chave devolvida por analisar_conformidade. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limite | No | Máximo de apontamentos. | |
| incluir_texto | No | Devolver também o texto segmentado, para você revisar. | |
| caminho_arquivo | Yes | Caminho do PDF/DOCX do PB/TR. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| caminho_arquivo | Yes | Caminho do PDF/DOCX do PB/TR. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| caminho_arquivo | Yes | Caminho do PDF/DOCX do PB/TR. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
9 tool updates
v0.1.0- First observed
analisar_conformidade - First observed
consultar_checklist - First observed
extrair_estrutura - First observed
gerar_relatorio - First observed
obter_texto_para_revisao - First observed
registrar_revisao_textual - First observed
revisar_ortografia - First observed
validar_tabelas - First observed
verificar_numeracao
TDQS
Scored across 9 tools
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.
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.
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.
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
Related MCP Connectors
MCP server for detecting and redacting PII (Personally Identifiable Information) in PDF documents.
City hiring-compliance MCP server with regulation search and full audit risk scoring.
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
Evidence-readiness MCP server: validate, audit, and score briefs, memos, and evidence packs.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn 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.-
- FlicenseNot gradedqualityDmaintenanceAn 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.-
- AlicenseNot gradedqualityDmaintenanceAn MCP-only server for evidence-based EPC tender screening that enables AI agents to run a full screening workflow, extract requirements, match company profiles, generate compliance matrices, and produce bid/no-bid advisory memos.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for comprehensive PDF processing including text extraction with OCR, keyword search with regex, table extraction, and page preview as Base64 PNG images.1MIT