A document comparison rule is only enforced if every pair gets compared, not the ones someone had time for. With the GroupDocs.Comparison.Mcp server, one prompt makes Claude Desktop, Claude Code, Cursor or GitHub Copilot compare every version pair in a folder locally and report which documents changed:

对于我的文档文件夹中的每个 -v1/-v2 对,比较这两个文件并告诉我哪些发票发生了变化以及如何变化。每个发票一行。

The step-by-step version with config and troubleshooting is in the documentation: 如何在文件夹中批量比较文档版本.

手动比较时哪些检查会失败?

Three situations come up repeatedly, and in each of them the unchecked document is the one that matters:

  • 重新发布的批次。 您需要确认新批次与已批准的内容匹配。
  • 供应商的“未更改”声明。 供应商声称文件未更改;您需要证据。
  • 迁移。 文档在系统或格式之间迁移,输出必须等于输入。

In each case the cost is not the comparison but the discipline of running it for every file. An agent that loops over a folder removes the discipline problem.

工作流如何运行?

  1. Name the pairs consistently. Any convention works, for example invoice-001-v1.pdf and invoice-001-v2.pdf, in one folder.
    一致命名对。 任意约定均可,例如 invoice-001-v1.pdf 与 invoice-001-v2.pdf 放在同一文件夹中。
  2. Point the server at the folder. Set GROUPDOCS_MCP_STORAGE_PATH to it. Files are resolved by name, so the agent passes invoice-001-v1.pdf, not a full path.
    将服务器指向该文件夹。 将 GROUPDOCS_MCP_STORAGE_PATH 设置为该路径。文件通过名称解析,代理只传递 invoice-001-v1.pdf,而不是完整路径。
  3. Check the license mode. Ask: “What is the license status of the comparison server?” The agent calls get_license_status.
    检查许可证模式。 询问:“比较服务器的许可证状态是什么?”代理调用 get_license_status。
  4. Run the sweep. Use the prompt from the start of this post. The agent calls analyze_changes once per pair.
    运行扫查。 使用本文开头的提示。代理对每个对调用一次 analyze_changes。
  5. Render only what matters. Ask: “Now produce marked-up copies for the three that changed.” The agent calls compare for those three, and each result is saved as <source-stem>_compared<ext>. Existing files are never overwritten.
    仅渲染重要内容。 询问:“现在为那三个有变化的生成标记副本。”代理对这三份调用 compare,并将每个结果保存为 <source-stem>_compared<ext>。现有文件永不被覆盖。

Use analyze_changes for the sweep and compare only for the exceptions. Rendering thirty marked-up documents that nobody opens is thirty times the work for the same answer.

代理决定了什么,引擎执行了什么?

步骤 代理 引擎
查找 -v1/-v2 对 匹配名称
比较每个对 调用 analyze_changes 检测更改,按页面和表格单元格
判断对未更改 读取 No changes detected 返回该结果
向您报告 为每个对写一行
为已更改的生成文件 调用 compare 渲染标记文档

The pass/fail judgment is made by the engine’s result, not by the agent’s impression of the text.

示例会话

Abridged and illustrative; the real wording depends on your client and model.

You:    For every -v1/-v2 pair in my documents folder, compare the
        two and tell me which invoices changed and how. One line
        per invoice.

Agent:  [calls analyze_changes: invoice-001-v1.pdf, invoice-001-v2.pdf]
        [calls analyze_changes: invoice-002-v1.pdf, invoice-002-v2.pdf]
        [calls analyze_changes: invoice-003-v1.pdf, invoice-003-v2.pdf]

        invoice-001: no changes detected
        invoice-002: changes detected (see the list for the pages)
        invoice-003: changes detected (see the list for the pages)

批量运行的限制是什么?

  • 评估上限(每个文档)。 没有许可证时,仅比较每个文档的前 2 页,结果带有水印,因此批量报告会悄然不完整。请在信任扫查前检查 get_license_status。
  • 对内格式相同。 如果两个文件格式不同,请先转换。
  • 错误的文件名并非致命。 工具会返回它能看到的文件列表,代理会自行纠正并重试。
  • 长时间扫查需要时间。 每个对都是一次真实比较;包含大型 PDF 的文件夹需要分钟而非秒。请在进行时询问进度。

常见问题

Can I compare multiple PDF files at once with AI?
是的。将配对文件放在同一文件夹中,要求代理比较每个配对。它会对每个配对调用一次 analyze_changes,并给出一个合并后的答案。

How do I detect unauthorized changes in documents?
将已批准的版本与流通中的版本进行比较,并让代理列出检测到更改的配对。每个返回 No changes detected 的配对内容相同(前提是服务器已授权;评估模式下仅比较每个文档的前 2 页)。

Do the files leave my machine?
不会。比较在本地进程中针对您配置的文件夹运行。您的提示文本和代理报告的行仅发送到您使用的模型客户端。

深入了解