MCP Enterprise 工具¶
以下 8 個工具需要 nextpdf/enterprise 商業授權。這些工具提供企業級合規、鑑識分析與 AI 整合能力。
forensic_analyze¶
對 PDF 文件執行完整鑑識分析,揭露元資料歷史、修改痕跡與隱藏內容。
風險等級:low(唯讀操作)
JSON Schema¶
{
"name": "forensic_analyze",
"description": "Perform forensic analysis of a PDF to reveal metadata history, modification traces, and hidden content.",
"inputSchema": {
"type": "object",
"properties": {
"path": { "type": "string" },
"depth": {
"type": "string",
"enum": ["basic", "standard", "deep"],
"default": "standard",
"description": "basic: metadata only; standard: + object streams; deep: + xref reconstruction."
},
"check_for": {
"type": "array",
"items": {
"type": "string",
"enum": ["hidden_text", "embedded_files", "javascript", "incremental_updates", "metadata_mismatch", "steganography"]
},
"default": ["hidden_text", "embedded_files", "javascript", "incremental_updates"]
}
},
"required": ["path"]
}
}
範例回應¶
{
"success": true,
"data": {
"risk_level": "medium",
"findings": [
{
"type": "incremental_updates",
"severity": "info",
"description": "PDF has 3 incremental update revisions",
"revisions": [
{
"revision": 1,
"created_at": "2026-01-10T09:00:00Z",
"creator_tool": "Microsoft Word 365"
},
{
"revision": 2,
"created_at": "2026-01-12T14:30:00Z",
"creator_tool": "Adobe Acrobat Pro 2025"
}
]
},
{
"type": "metadata_mismatch",
"severity": "warning",
"description": "DocInfo CreationDate differs from XMP xmp:CreateDate by 2 hours",
"docinfo_value": "2026-01-10T09:00:00+00:00",
"xmp_value": "2026-01-10T11:00:00+02:00"
}
],
"embedded_objects": {
"javascript_count": 0,
"embedded_files_count": 0,
"hidden_text_blocks": 0
}
}
}
embed_documents¶
將 PDF 文件分塊、向量化並索引至向量資料庫,供 RAG 查詢使用。
風險等級:medium(寫入外部向量資料庫)
JSON Schema¶
{
"name": "embed_documents",
"description": "Chunk, embed, and index PDF documents into a vector store for RAG retrieval.",
"inputSchema": {
"type": "object",
"properties": {
"paths": {
"type": "array",
"items": { "type": "string" },
"description": "List of PDF paths to embed."
},
"vector_store": {
"type": "object",
"properties": {
"backend": {
"type": "string",
"enum": ["qdrant", "pinecone", "pgvector"],
"description": "Vector database backend."
},
"collection": { "type": "string", "description": "Collection / index name." },
"namespace": { "type": "string", "description": "Namespace for tenant isolation." }
},
"required": ["backend", "collection"]
},
"options": {
"type": "object",
"properties": {
"chunking_strategy": {
"type": "string",
"enum": ["semantic", "fixed-size", "paragraph"],
"default": "semantic"
},
"max_chunk_size": { "type": "integer", "default": 512 },
"chunk_overlap": { "type": "integer", "default": 64 },
"embedding_model": { "type": "string", "default": "nextpdf-embed-v1" },
"upsert": { "type": "boolean", "default": true }
}
}
},
"required": ["paths", "vector_store"]
}
}
範例回應¶
{
"success": true,
"data": {
"documents_processed": 3,
"total_chunks": 142,
"vectors_upserted": 142,
"collection": "knowledge-base-v2",
"namespace": "tenant-abc123",
"duration_ms": 8450,
"per_document": [
{
"path": "/workspace/policy-manual.pdf",
"chunks": 58,
"status": "success"
}
]
}
}
semantic_search¶
在已索引的 PDF 文件集合中執行語意搜尋。
風險等級:low(唯讀操作)
JSON Schema¶
{
"name": "semantic_search",
"description": "Perform semantic search across indexed PDF documents.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Natural language search query.",
"minLength": 1,
"maxLength": 2000
},
"vector_store": {
"type": "object",
"properties": {
"backend": { "type": "string", "enum": ["qdrant", "pinecone", "pgvector"] },
"collection": { "type": "string" },
"namespace": { "type": "string" }
},
"required": ["backend", "collection"]
},
"options": {
"type": "object",
"properties": {
"top_k": { "type": "integer", "default": 5, "minimum": 1, "maximum": 50 },
"min_score": { "type": "number", "default": 0.7, "minimum": 0.0, "maximum": 1.0 },
"filter": {
"type": "object",
"description": "Metadata filters (e.g., {\"page\": 5, \"language\": \"zh-TW\"})."
},
"include_context": {
"type": "boolean",
"default": true,
"description": "Include surrounding text context for each result."
}
}
}
},
"required": ["query", "vector_store"]
}
}
範例回應¶
{
"success": true,
"data": {
"query": "退款政策的有效期限是多久?",
"result_count": 3,
"results": [
{
"chunk_id": "policy-manual-chunk-0042",
"score": 0.923,
"text": "退款申請須於購買日起 30 天內提出,逾期恕不受理。",
"source": {
"path": "/workspace/policy-manual.pdf",
"page": 15,
"section": "退款與退貨政策"
},
"context": {
"before": "消費者保護政策\n",
"after": "\n退款將於審核通過後 7 個工作日內退回原付款帳戶。"
}
}
]
}
}
generate_invoice¶
生成符合 ZUGFeRD 2.3 標準的電子發票 PDF。
風險等級:high(具法律效力的財務文件)
JSON Schema¶
{
"name": "generate_invoice",
"description": "Generate a ZUGFeRD 2.3 compliant electronic invoice PDF.",
"inputSchema": {
"type": "object",
"properties": {
"output_path": { "type": "string" },
"invoice_data": {
"type": "object",
"properties": {
"invoice_number": { "type": "string" },
"invoice_date": { "type": "string", "format": "date" },
"due_date": { "type": "string", "format": "date" },
"seller": {
"type": "object",
"properties": {
"name": { "type": "string" },
"tax_id": { "type": "string" },
"address": { "type": "string" }
},
"required": ["name", "tax_id"]
},
"buyer": {
"type": "object",
"properties": {
"name": { "type": "string" },
"tax_id": { "type": "string" },
"address": { "type": "string" }
},
"required": ["name"]
},
"line_items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"description": { "type": "string" },
"quantity": { "type": "number" },
"unit": { "type": "string" },
"unit_price": { "type": "number" },
"tax_rate": { "type": "number" }
},
"required": ["description", "quantity", "unit_price", "tax_rate"]
}
},
"currency": { "type": "string", "default": "TWD" },
"payment_means": { "type": "string", "enum": ["bank-transfer", "credit-card", "cash"] }
},
"required": ["invoice_number", "invoice_date", "seller", "buyer", "line_items"]
},
"conformance_level": {
"type": "string",
"enum": ["MINIMUM", "BASIC WL", "BASIC", "EN 16931", "EXTENDED"],
"default": "EN 16931"
}
},
"required": ["output_path", "invoice_data"]
}
}
batch_process¶
對一批 PDF 文件執行相同操作。
風險等級:medium(風險等級繼承自底層操作)
JSON Schema¶
{
"name": "batch_process",
"description": "Apply the same operation to a batch of PDF files.",
"inputSchema": {
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["compress_images", "add_watermark", "convert_to_pdfa", "extract_text", "extract_metadata"],
"description": "The operation to apply to all files in the batch."
},
"input_paths": {
"type": "array",
"items": { "type": "string" },
"maxItems": 1000
},
"output_dir": { "type": "string" },
"operation_options": {
"type": "object",
"description": "Options to pass to the underlying operation (same as the individual tool's options)."
},
"concurrency": {
"type": "integer",
"default": 8,
"minimum": 1,
"maximum": 32,
"description": "Number of parallel workers."
},
"on_error": {
"type": "string",
"enum": ["stop", "continue", "retry"],
"default": "continue"
}
},
"required": ["operation", "input_paths", "output_dir"]
}
}
audit_trail¶
生成指定 PDF 文件的完整操作審計報告。
風險等級:low(唯讀操作)
JSON Schema¶
{
"name": "audit_trail",
"description": "Generate an audit trail report for a PDF document.",
"inputSchema": {
"type": "object",
"properties": {
"path": { "type": "string" },
"output_path": {
"type": "string",
"description": "Optional path to save the audit report as PDF. If omitted, returns JSON."
},
"include_hash": {
"type": "boolean",
"default": true,
"description": "Include SHA-256 hash of the document at each revision."
}
},
"required": ["path"]
}
}
apply_policy¶
套用合規政策(例如 GDPR 資料清除、資料保留期限標記)。
風險等級:high(可能永久修改或刪除內容)
JSON Schema¶
{
"name": "apply_policy",
"description": "Apply a compliance policy to a PDF (e.g., GDPR erasure, data retention marking).",
"inputSchema": {
"type": "object",
"properties": {
"input_path": { "type": "string" },
"output_path": { "type": "string" },
"policy": {
"type": "string",
"enum": ["gdpr-erasure", "data-retention-label", "classification-marking", "custom"],
"description": "Compliance policy to apply."
},
"policy_options": {
"type": "object",
"description": "Policy-specific options.",
"properties": {
"retention_date": { "type": "string", "format": "date" },
"classification": {
"type": "string",
"enum": ["public", "internal", "confidential", "restricted"]
},
"erasure_targets": {
"type": "array",
"items": { "type": "string" },
"description": "Field names or regex patterns to erase for GDPR compliance."
}
}
}
},
"required": ["input_path", "output_path", "policy"]
}
}
hsm_sign¶
透過 HSM(硬體安全模組)執行企業級 PAdES 數位簽章。
風險等級:high(不可逆,具法律效力)
JSON Schema¶
{
"name": "hsm_sign",
"description": "Sign a PDF using a Hardware Security Module (HSM) via PKCS#11.",
"inputSchema": {
"type": "object",
"properties": {
"input_path": { "type": "string" },
"output_path": { "type": "string" },
"hsm_config": {
"type": "object",
"properties": {
"pkcs11_library": { "type": "string", "description": "Path to PKCS#11 shared library." },
"slot_id": { "type": "integer", "default": 0 },
"key_label": { "type": "string", "description": "Label of the signing key in HSM." },
"pin": { "type": "string", "description": "HSM slot PIN (use env var reference in production)." }
},
"required": ["pkcs11_library", "key_label"]
},
"signature_level": {
"type": "string",
"enum": ["pades-b-b", "pades-b-t", "pades-b-lt", "pades-b-lta"],
"default": "pades-b-lta"
},
"timestamp_url": { "type": "string" }
},
"required": ["input_path", "output_path", "hsm_config"]
}
}
HITL 強制要求:此工具為
high風險等級。AI 助理必須在執行前向使用者展示完整的簽章參數摘要,並取得明確確認。HSM 操作通常具有稽核記錄且不可撤銷。
參見¶
Commercial License
This feature requires a commercial license. Contact our team for pricing and deployment support.
Contact Sales