Metadaten-Tools
Der MCP-Server stellt zwei Tools zur Metadatenbearbeitung von Dokumenten bereit. Beide unterstützen PDF- und DOCX-Formate mit automatischer Formaterkennung.
onlyoffice_get_metadata
Abschnitt betitelt „onlyoffice_get_metadata“Metadaten aus einem PDF- oder DOCX-Dokument extrahieren.
Eingabe
Abschnitt betitelt „Eingabe“| 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) |
Quelltypen
Abschnitt betitelt „Quelltypen“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"Beispiel
Abschnitt betitelt „Beispiel“{ "source": "JVBERi0xLjQK...", "sourceType": "base64"}Antwort
Abschnitt betitelt „Antwort“{ "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": [] }}onlyoffice_set_metadata
Abschnitt betitelt „onlyoffice_set_metadata“Metadaten in einem PDF- oder DOCX-Dokument ändern.
Eingabe
Abschnitt betitelt „Eingabe“| 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) |
Änderungen
Abschnitt betitelt „Änderungen“{ "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"]}Auslieferungsmethode
Abschnitt betitelt „Auslieferungsmethode“| Wert | Beschreibung |
|---|---|
"url" |
Download-URL für das geänderte Dokument zurückgeben (HTTP-Standard) |
"base64" |
Dokument als Inline-base64 zurückgeben (STDIO-Standard) |
Beispiel
Abschnitt betitelt „Beispiel“{ "source": "JVBERi0xLjQK...", "sourceType": "base64", "modifications": { "standard": { "title": "Updated Document", "author": "Jane Doe" } }, "deliveryMethod": "url"}Antwort
Abschnitt betitelt „Antwort“{ "success": true, "documentType": "pdf", "modifiedFields": ["title", "author"], "output": { "base64": "JVBERi0xLjQK...", "mimeType": "application/pdf", "filename": "document.pdf" }}Unterstützte Metadatenfelder
Abschnitt betitelt „Unterstützte Metadatenfelder“| 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) |
| Feld | Lesen | Schreiben | Beschreibung |
|---|---|---|---|
title |
Ja | Ja | Dokumenttitel |
author |
Ja | Ja | Ersteller (dc:creator) |
subject |
Ja | Ja | Dokumentbetreff |
keywords |
Ja | Ja | Schlüsselwörter |
creator |
Ja | Ja | Erstellende Anwendung |
creationDate |
Ja | Ja | Erstellungsdatum |
modificationDate |
Ja | Ja | Zuletzt geändert |
Verwandte Themen
Abschnitt betitelt „Verwandte Themen“- Tools-Referenz - Alle 26 MCP-Tools
- API-Übersicht - Tool-Kategorien