Skip to main content
Glama

Update document metadata

update_metadata

Rewrite the /Info metadata (title, author, subject, keywords) of an existing PDF as an incremental update, keeping XMP in sync and earlier revisions byte-identical.

Instructions

Rewrite /Info (title, author, subject, keywords) of an EXISTING PDF as an incremental update; XMP stays in sync on PDF/A documents; /ModDate is refreshed (pin modDate for reproducible bytes). Earlier revisions and signatures stay byte-identical — the new revision is unsigned (sign_pdf / timestamp_pdf again if needed). Encrypted sources → ENCRYPTED_SOURCE. For metadata at generation time use the metadata option of the document tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoNew /Info /Title (mirrored to XMP dc:title when the document carries XMP).
authorNoNew /Info /Author (XMP dc:creator).
modDateNoISO-8601 modification instant for /ModDate and xmp:ModifyDate. Defaults to now; pin it for reproducible output.
subjectNoNew /Info /Subject (XMP dc:description).
keywordsNoNew /Info /Keywords (XMP pdf:Keywords).
pdfBase64YesBase64-encoded PDF to update (unencrypted).
outputModeNo'base64' (default) returns the PDF inline; 'file' writes it inside the PDFNATIVE_MCP_OUTPUT_DIR sandbox (SECURITY_VIOLATION when the sandbox is not configured).base64
outputPathNoRelative path inside PDFNATIVE_MCP_OUTPUT_DIR (required when outputMode='file').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
summaryNoTool-specific summary, when produced.
filePathNoSandboxed absolute path (file mode).
sizeBytesYes
diagnosticsNoEngine diagnostics (when includeDiagnostics=true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.6.2
    • changedOutput schema / properties / diagnostics / description
      Previous value: -"PDF/A diagnostics (when includeDiagnostics=true)."New value: +"Engine diagnostics (when includeDiagnostics=true)."
  2. Added

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses incremental-update semantics, that earlier revisions and signatures stay byte-identical, that the new revision is unsigned, the ENCRYPTED_SOURCE failure for encrypted sources, XMP sync on PDF/A, and ModDate refresh/pinning for reproducibility. These are exactly the behavioral traits an agent needs that annotations (readOnly/idempotent/destructive hints) cannot convey.

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

Conciseness5/5

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

Four dense sentences, front-loaded with the core action and followed by the behavioral caveats and the alternative. No filler or restated boilerplate; every sentence carries distinct information.

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

Completeness5/5

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

With an output schema and full annotation coverage already present, the description fills the remaining gaps: mutation semantics, signature invalidation, error codes, and alternative routing. Nothing an agent needs to invoke this correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the field-level semantics are already documented. The description still adds framing value by tying the fields to the /Info vs XMP dual-write behavior and to the ModDate pin for reproducible bytes, though it largely mirrors what the schema descriptions already say.

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?

States a specific verb and resource ('Rewrite /Info (title, author, subject, keywords) of an EXISTING PDF') scoped precisely to an incremental update of an existing file. It distinguishes itself from the generation-time siblings by naming the `metadata` option of the document tools, so an agent can route without opening a schema.

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

Usage Guidelines5/5

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

Explicitly names the alternative path ('For metadata at generation time use the `metadata` option of the document tools') and the condition that selects it. It also gives follow-up routing ('sign_pdf / timestamp_pdf again if needed'), so both when-to-use and what-to-do-next are covered.

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