Zum Inhalt springen

Metadaten-Tools

Der MCP-Server stellt zwei Tools zur Metadatenbearbeitung von Dokumenten bereit. Beide unterstützen PDF- und DOCX-Formate mit automatischer Formaterkennung.

Metadaten aus einem PDF- oder DOCX-Dokument extrahieren.

Parameter Typ Erforderlich Beschreibung
source string Ja Dokumentinhalt als base64, Dateipfad oder URL
sourceType enum Ja "base64", "path" oder "url"
includeRaw boolean Nein Rohes formatspezifisches Metadaten einbeziehen (Standard: false)
includeCustom boolean Nein Benutzerdefinierte Eigenschaften einbeziehen (Standard: true)

Verwenden Sie source (string) + sourceType (enum) zusammen:

// Base64: source = base64 string, sourceType = "base64"
// URL: source = URL string, sourceType = "url"
// Path: source = file path, sourceType = "path"
{
"source": "JVBERi0xLjQK...",
"sourceType": "base64"
}
{
"success": true,
"documentType": "pdf",
"metadata": {
"standard": {
"title": "Document Title",
"author": "Author Name",
"subject": "Document Subject",
"keywords": ["keyword1", "keyword2"],
"creator": "Creator Application",
"creationDate": "2024-01-15T10:00:00.000Z",
"modificationDate": "2024-06-20T14:30:00.000Z"
},
"custom": []
}
}

Metadaten in einem PDF- oder DOCX-Dokument ändern.

Parameter Typ Erforderlich Beschreibung
source string Ja Dokumentinhalt als base64, Dateipfad oder URL
sourceType enum Ja "base64", "path" oder "url"
modifications object Ja Anzuwendende Metadatenänderungen
deliveryMethod enum Nein "url" oder "base64" (Standard abhängig vom Transport)
{
"standard": {
"title": "New Title",
"author": "New Author",
"keywords": ["new", "keywords"]
},
"setCustom": [
{ "name": "ProjectId", "value": "12345", "type": "string" },
{ "name": "Approved", "value": true, "type": "boolean" }
],
"removeCustom": ["OldProperty"]
}
Wert Beschreibung
"url" Download-URL für das geänderte Dokument zurückgeben (HTTP-Standard)
"base64" Dokument als Inline-base64 zurückgeben (STDIO-Standard)
{
"source": "JVBERi0xLjQK...",
"sourceType": "base64",
"modifications": {
"standard": { "title": "Updated Document", "author": "Jane Doe" }
},
"deliveryMethod": "url"
}
{
"success": true,
"documentType": "pdf",
"modifiedFields": ["title", "author"],
"output": {
"base64": "JVBERi0xLjQK...",
"mimeType": "application/pdf",
"filename": "document.pdf"
}
}

Feld Lesen Schreiben Beschreibung
title Ja Ja Dokumenttitel
author Ja Ja Dokumentautor
subject Ja Ja Dokumentbetreff
keywords Ja Ja Schlüsselwörter (String-Array)
creator Ja Ja Erstellende Anwendung
producer Ja Ja PDF-Producer
creationDate Ja Ja Erstellungsdatum (ISO 8601)
modificationDate Ja Ja Zuletzt geändert (ISO 8601)