Skip to content

Metadata Tools

The MCP server provides two tools for document metadata manipulation. Both support PDF and DOCX formats with automatic format detection.

Extract metadata from a PDF or DOCX document.

Parameter Type Required Description
source string Yes Document content as base64, file path, or URL
sourceType enum Yes "base64", "path", or "url"
includeRaw boolean No Include raw format-specific metadata (default: false)
includeCustom boolean No Include custom properties (default: true)

Use source (string) + sourceType (enum) together:

// 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": []
}
}

Modify metadata in a PDF or DOCX document.

Parameter Type Required Description
source string Yes Document content as base64, file path, or URL
sourceType enum Yes "base64", "path", or "url"
modifications object Yes Metadata changes to apply
deliveryMethod enum No "url" or "base64" (default depends on 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"]
}
Value Description
"url" Return a download URL for the modified document (HTTP default)
"base64" Return the document as inline base64 (STDIO default)
{
"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"
}
}

Field Read Write Description
title Yes Yes Document title
author Yes Yes Document author
subject Yes Yes Document subject
keywords Yes Yes Keywords (string array)
creator Yes Yes Creating application
producer Yes Yes PDF producer
creationDate Yes Yes Creation date (ISO 8601)
modificationDate Yes Yes Last modified date (ISO 8601)