pdf-metadata-editor
v4.5.0Read and edit PDF metadata through the Model Context Protocol.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pdf_list_fields List PDF metadata fields
List every metadata field identifier, its data type, and whether it is writable. Call this before pdf_set_metadata to discover valid field names. Read-only and free.
pdf_read_metadata Read PDF metadata
Read metadata from one or more PDFs or directories, like the CLI's batch input. By default only populated fields are returned; pass fields to request specific field IDs. A batch may contain at most 100 files or operations. Read-only and free.
| Parameter | Type | Description |
|---|---|---|
paths * | array | PDF files and/or directories, relative to the MCP root unless absolute paths inside the root are used. Directories are searched recursively for .pdf files. A single file is ["one.pdf"]. |
fields | array | Optional subset of metadata field IDs. |
ownerPassword | string | Owner password for an encrypted PDF. If omitted, a protected PDF returns password_required. |
pdf_set_metadata Set PDF metadata
Set one or more metadata fields on every input PDF. Equivalent to the CLI 'edit' command. Only the supplied fields are changed; all other metadata in each document is preserved. Values can use {field.id} templates expanded from each file's own metadata. Writes in place by default, or beneath outputDir when supplied. A batch may contain at most 100 files or operations. May require a license.
| Parameter | Type | Description |
|---|---|---|
metadata * | object | Map of metadata field IDs to values. |
paths * | array | PDF files and/or directories, relative to the MCP root unless absolute paths inside the root are used. Directories are searched recursively for .pdf files. A single file is ["one.pdf"]. |
outputDir | string | Optional output directory, relative to the MCP root. The input directory structure is preserved beneath it. When omitted, files are updated in place. |
ownerPassword | string | Owner password for an encrypted PDF. If omitted, a protected PDF returns password_required. |
pdf_clear_metadata Clear PDF metadata
Clear all metadata or only the selected fields on every input PDF. Equivalent to the CLI 'clear' command. Writes in place by default, or beneath outputDir when supplied. A batch may contain at most 100 files or operations. May require a license.
| Parameter | Type | Description |
|---|---|---|
paths * | array | PDF files and/or directories, relative to the MCP root unless absolute paths inside the root are used. Directories are searched recursively for .pdf files. A single file is ["one.pdf"]. |
fields | array | Field IDs to clear. Defaults to ["all"]. |
outputDir | string | Optional output directory, relative to the MCP root. The input directory structure is preserved beneath it. When omitted, files are updated in place. |
ownerPassword | string | Owner password for an encrypted PDF. If omitted, a protected PDF returns password_required. |
pdf_rename Rename PDFs from metadata
Rename every input PDF using a metadata template such as '{doc.author} - {doc.title}.pdf'. Equivalent to the CLI 'rename' command. The destination must not exist. When outputDir is omitted the file is moved within its current directory; when supplied the file is copied beneath outputDir. A batch may contain at most 100 files or operations. May require a license.
| Parameter | Type | Description |
|---|---|---|
paths * | array | PDF files and/or directories, relative to the MCP root unless absolute paths inside the root are used. Directories are searched recursively for .pdf files. A single file is ["one.pdf"]. |
template * | string | Rename template, e.g. '{doc.author} - {doc.title}.pdf'. |
outputDir | string | Optional destination directory. Defaults to moving within each source directory. The input directory structure is preserved beneath it. |
ownerPassword | string | Owner password for an encrypted PDF. If omitted, a protected PDF returns password_required. |
pdf_export_json Export PDF metadata as JSON
Export metadata from one or more PDFs or directories to JSON. Equivalent to the CLI 'tojson' command. By default one aggregate file is written; set perFileExport to write one file per PDF. A batch may contain at most 100 files or operations. May require a license.
| Parameter | Type | Description |
|---|---|---|
paths * | array | PDF files and/or directories, relative to the MCP root unless absolute paths inside the root are used. Directories are searched recursively for .pdf files. A single file is ["one.pdf"]. |
fields | array | Optional field IDs to export. Defaults to all readable, non-secret fields. Use ["all"] explicitly or omit. file.fullPath is always included. |
outputDir | string | Optional output directory. Defaults to the input directory. |
outputFile | string | Base output file name, default 'metadata-export'. The format extension is added. Do not include directories; use outputDir. |
ownerPassword | string | Owner password for an encrypted PDF. If omitted, a protected PDF returns password_required. |
perFileExport | boolean | When true, write one export file per input PDF. Default false: one aggregate file. |
relativePaths | boolean | When true (default), file.fullPath values are relative to the input directory. When false, absolute paths are exported. |
pdf_export_yaml Export PDF metadata as YAML
Export metadata from one or more PDFs or directories to YAML. Equivalent to the CLI 'toyaml' command. By default one aggregate file is written; set perFileExport to write one file per PDF. A batch may contain at most 100 files or operations. May require a license.
| Parameter | Type | Description |
|---|---|---|
paths * | array | PDF files and/or directories, relative to the MCP root unless absolute paths inside the root are used. Directories are searched recursively for .pdf files. A single file is ["one.pdf"]. |
fields | array | Optional field IDs to export. Defaults to all readable, non-secret fields. Use ["all"] explicitly or omit. file.fullPath is always included. |
outputDir | string | Optional output directory. Defaults to the input directory. |
outputFile | string | Base output file name, default 'metadata-export'. The format extension is added. Do not include directories; use outputDir. |
ownerPassword | string | Owner password for an encrypted PDF. If omitted, a protected PDF returns password_required. |
perFileExport | boolean | When true, write one export file per input PDF. Default false: one aggregate file. |
relativePaths | boolean | When true (default), file.fullPath values are relative to the input directory. When false, absolute paths are exported. |
pdf_export_csv Export PDF metadata as CSV
Export metadata from one or more PDFs or directories to CSV. Equivalent to the CLI 'tocsv' command. By default one aggregate file is written; set perFileExport to write one file per PDF. A batch may contain at most 100 files or operations. May require a license.
| Parameter | Type | Description |
|---|---|---|
paths * | array | PDF files and/or directories, relative to the MCP root unless absolute paths inside the root are used. Directories are searched recursively for .pdf files. A single file is ["one.pdf"]. |
fields | array | Optional field IDs to export. Defaults to all readable, non-secret fields. Use ["all"] explicitly or omit. file.fullPath is always included. |
outputDir | string | Optional output directory. Defaults to the input directory. |
outputFile | string | Base output file name, default 'metadata-export'. The format extension is added. Do not include directories; use outputDir. |
ownerPassword | string | Owner password for an encrypted PDF. If omitted, a protected PDF returns password_required. |
perFileExport | boolean | When true, write one export file per input PDF. Default false: one aggregate file. |
relativePaths | boolean | When true (default), file.fullPath values are relative to the input directory. When false, absolute paths are exported. |
pdf_import_from_filename Import PDF metadata from file names
Extract metadata from each PDF's file name and write it back. Equivalent to the CLI 'fromfilename' command. The template uses {field.id} placeholders, for example '{doc.author} - {doc.title}'. A batch may contain at most 100 files or operations. May require a license.
| Parameter | Type | Description |
|---|---|---|
paths * | array | PDF files and/or directories, relative to the MCP root unless absolute paths inside the root are used. Directories are searched recursively for .pdf files. A single file is ["one.pdf"]. |
template * | string | Extract template, e.g. '{doc.author} - {doc.title}'. |
outputDir | string | Optional output directory, relative to the MCP root. The input directory structure is preserved beneath it. When omitted, files are updated in place. |
ownerPassword | string | Owner password for an encrypted PDF. If omitted, a protected PDF returns password_required. |
pdf_import_from_json Import PDF metadata from JSON
Import metadata from JSON files. Equivalent to the CLI 'fromjson' command. Each record must contain file.fullPath. A record's prop.ownerPassword is used to open that PDF when present; otherwise ownerPassword is used. A batch may contain at most 100 files or operations. May require a license.
| Parameter | Type | Description |
|---|---|---|
importPaths * | array | Import files and/or directories, relative to the MCP root. Directories are searched for files matching this tool's format. A single file is ["one.json"] for JSON imports; use the matching extension fo… |
outputDir | string | Optional output directory, relative to the MCP root. The input directory structure is preserved beneath it. When omitted, files are updated in place. |
ownerPassword | string | Owner password for an encrypted PDF. If omitted, a protected PDF returns password_required. Used when an import record does not contain prop.ownerPassword. |
pdf_import_from_yaml Import PDF metadata from YAML
Import metadata from YAML files. Equivalent to the CLI 'fromyaml' command. Each record must contain file.fullPath. A record's prop.ownerPassword is used to open that PDF when present; otherwise ownerPassword is used. A batch may contain at most 100 files or operations. May require a license.
| Parameter | Type | Description |
|---|---|---|
importPaths * | array | Import files and/or directories, relative to the MCP root. Directories are searched for files matching this tool's format. A single file is ["one.json"] for JSON imports; use the matching extension fo… |
outputDir | string | Optional output directory, relative to the MCP root. The input directory structure is preserved beneath it. When omitted, files are updated in place. |
ownerPassword | string | Owner password for an encrypted PDF. If omitted, a protected PDF returns password_required. Used when an import record does not contain prop.ownerPassword. |
pdf_import_from_csv Import PDF metadata from CSV
Import metadata from CSV files. Equivalent to the CLI 'fromcsv' command. Each record must contain file.fullPath. A record's prop.ownerPassword is used to open that PDF when present; otherwise ownerPassword is used. A batch may contain at most 100 files or operations. May require a license.
| Parameter | Type | Description |
|---|---|---|
importPaths * | array | Import files and/or directories, relative to the MCP root. Directories are searched for files matching this tool's format. A single file is ["one.json"] for JSON imports; use the matching extension fo… |
outputDir | string | Optional output directory, relative to the MCP root. The input directory structure is preserved beneath it. When omitted, files are updated in place. |
ownerPassword | string | Owner password for an encrypted PDF. If omitted, a protected PDF returns password_required. Used when an import record does not contain prop.ownerPassword. |
pdf_license Manage the license
Check, activate, or release the license. Activate needs the license information the user received by email: the agent should ask the user for the email address and the license ID, then pass them as one comma-separated string in the license argument, for example "name@example.com,ABC-123". Pass the values unchanged, never invent them, and never repeat the license back. Activation contacts the license server and is bound to this computer. Use status to check the current license, and release before moving it to another computer.
| Parameter | Type | Description |
|---|---|---|
action | string | status checks the current license, activate installs one, release removes it. |
license | string | License information passed to the license provider unchanged. For activate, the email address and the license ID from the purchase email, separated by a comma. Ignored for status and release. |