Skip to main content
Glama

Edit or strip PDF metadata

pdf_metadata_write
Read-onlyIdempotent

Edit or strip PDF metadata: set title, author, subject, keywords, dates and custom fields, or remove all info, XMP, page-level data and document ID.

Instructions

Change PDF info fields (title, author, subject, keywords, creator, producer, dates, custom fields) or strip all metadata: info fields, XMP, page-level data and the document ID, and drop unreachable leftovers from earlier edits so no trace stays in the bytes. Untouched values keep their exact original form. Web version: https://s3eidat.github.io/pdf-metadata/

Input Schema

NameRequiredDescriptionDefault
fileYesThe PDF: a local file path (absolute, or relative to the server's --root) or base64 data (raw or a data: URI).
stripNoRemove ALL metadata (other edits are ignored).
titleNoTitle. "" removes it; omit to keep it.
authorNoAuthor. "" removes it; omit to keep it.
customNoCustom info fields to set; null removes one. E.g. {"Company": null}.
outputNoWhere to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set).
creatorNoCreator (the app that made it). "" removes it; omit to keep it.
modDateNoModification date as ISO 8601. "" removes it; omit to keep it.
subjectNoSubject. "" removes it; omit to keep it.
keywordsNoKeywords. "" removes it; omit to keep it.
producerNoProducer (the PDF engine). "" removes it; omit to keep it.
removeXmpNoRemove the XMP metadata stream (and page-level XMP/PieceInfo).
creationDateNoCreation date as ISO 8601, e.g. "2026-03-14T09:30:00+03:00". "" removes it; omit to keep it.
returnBase64NoAlso return the output as base64 in the result (only for small files). Default false.
removeDocumentIdNoRemove the document ID from the trailer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description explicitly says this tool changes PDF metadata and can strip all metadata, XMP, page-level data, and the document ID. The annotations declare readOnlyHint=true, which directly contradicts a tool that writes output and mutates metadata. This is an annotation contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action and strip scope, and the preservation rule is stated in a short follow-up sentence. The web-version URL is non-essential and slightly promotional, but the description remains compact overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the two main modes and the destructive scope of stripping, which is important for a complex 15-parameter mutation tool. However, it does not describe output behavior such as where results are written or what happens to the original file, and the annotations misclassify the tool as read-only.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already documents all 15 parameters in detail, including empty-string removal semantics and custom-field null removal. The description adds preservation behavior for untouched values and lists field categories, but most parameter meaning is already supplied by the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: change PDF info fields or strip all metadata. It enumerates the editable fields and the scope of stripping, so an agent can distinguish this write operation from sibling read-oriented tools like pdf_metadata_read.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly presents two usage modes: editing selected info fields versus stripping all metadata. It does not explicitly name pdf_metadata_read as the alternative or state when not to use this tool, but the intended context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools