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:
For every
-v1/-v2pair in my documents folder, compare the two and tell me which invoices changed and how. One line per invoice.
The step-by-step version with config and troubleshooting is in the documentation: How to batch-compare document versions in a folder.
手動比較時哪些檢查會失敗?
以下三種情況經常出現,在每種情況下,未檢查的文件才是關鍵:
- 重新發行的批次。 您需要確認新批次與已批准的內容相符。
- 供應商的「未變更」聲明。 供應商聲稱文件未變更;您需要證據。
- 遷移。 文件在系統或格式之間搬移,輸出必須與輸入相同。
在每種情況下,成本不在於比較本身,而在於對每個文件都執行比較的自律性。使用在資料夾中循環的代理可以消除這個自律問題。
工作流程如何運作?
- 一致命名配對。 任何命名慣例皆可,例如在同一資料夾中使用
invoice-001-v1.pdf與invoice-001-v2.pdf。 - 將伺服器指向該資料夾。 將
GROUPDOCS_MCP_STORAGE_PATH設為該路徑。檔案以名稱解析,因此代理傳遞的是invoice-001-v1.pdf,而非完整路徑。 - 檢查授權模式。 詢問:「比較伺服器的授權狀態是什麼?」代理會呼叫
get_license_status。 - 執行掃描。 使用本文開頭的提示。代理會對每個配對呼叫一次
analyze_changes。 - 僅渲染重要內容。 詢問:「現在為三個有變更的文件產生標記副本。」代理會對這三個呼叫
compare,每個結果儲存為<source-stem>_compared<ext>。不會覆寫現有檔案。
對於掃描使用 analyze_changes,僅對例外情況使用 compare。渲染三十個沒人開啟的標記文件,其工作量是相同答案的三十倍。
代理決定什麼,引擎執行什麼?
| 步驟 | 代理 | 引擎 |
|---|---|---|
尋找 -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)
批次執行的限制是什麼?
- 評估上限(每份文件)。 若未取得授權,僅比較每份文件的前兩頁,且結果會帶有浮水印,因此批次報告會悄悄不完整。請在信任掃描前檢查
get_license_status。 - 配對內需相同格式。 若兩檔案格式不同,請先轉換。
- 名稱錯誤不致致命。 工具會回傳它能看到的檔案清單,代理會自行修正並重新嘗試。
- 長時間掃描需時。 每個配對都是實際比較;大量大型 PDF 的資料夾需要分鐘而非秒。請在過程中要求進度回報。
常見問題
我可以一次比較多個 PDF 檔案嗎?
可以。將配對放在同一資料夾,並請求代理比較每個配對。它會對每個配對呼叫一次 analyze_changes,並提供一個彙總答案。
我如何偵測文件中的未授權變更?
將已批准的版本與流通中的版本進行比較,並請求代理列出偵測到變更的配對。只要伺服器已取得授權,返回 No changes detected 的每個配對內容皆相同;在評估模式下僅比較每份文件的前兩頁。
檔案會離開我的機器嗎?
不會。比較在本機進程中對您設定的資料夾執行。您的提示文字與代理回報的行會傳送至您客戶端使用的模型。
深入了解
- 文件說明,標準操作方式: How to batch-compare document versions in a folder
- 文件中心: GroupDocs.Comparison MCP Server
- 從這裡開始: 3 Ways to Compare Documents with AI Agents and MCP
- 相關: Why an AI agent should not redline a contract by reading it
- 相關: Change summaries for release notes, audits and approvals — automated with MCP
- 本地部署與安全模型: 3 architectures for AI document processing, and the one that keeps files inside your network
- 問題討論: GroupDocs Comparison forum
- 來源: GroupDocs.Comparison.Mcp on GitHub