Skip to main content
Glama

pdf_set_metadata

Set PDF Metadata — Write or update metadata fields (Title, Author, Subject, Keywords) in a PDF. Fields are soft-verified after writing (mismatches are logged, not failed). At least ONE of title/author/subject/keywords must be provided or the request is rejected. [category: pdf]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesThe PDF to edit. Password-protected input is rejected 400 — run pdf_unlock first.
titleNoAt least one of title/author/subject/keywords is required.
authorNoWritten verbatim to Author. Empty = left unchanged — this tool cannot blank a field (use pdf_remove_metadata to clear).
subjectNoWritten verbatim to Subject. Empty = left unchanged — clearing a field is not possible here (use pdf_remove_metadata).
keywordsNoFree-text Keywords string written verbatim (commas are convention, not parsed). Empty = left unchanged, never cleared.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / title / x-ui
      Added value: +{
      +  "unset_label": "Keeps the current title"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description discloses the non-obvious soft-verification behavior: mismatches are logged, not failed. It also reveals that empty fields are left unchanged and cannot be blanked, which adds behavioral context not available from the annotations alone.

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?

The main description is compact and front-loaded with the core action, followed by the most important behavioral caveat and input constraint. The schema descriptions are also concise and earn their place by clarifying non-obvious semantics.

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

Completeness4/5

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

The definition fully covers the input contract, required-field rule, password handling, clearing limitation, and verification behavior. It does not describe the success return payload, but this is a simple mutation tool and the provided information is sufficient for correct invocation.

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

Parameters5/5

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

Schema coverage is 100%, but the descriptions go well beyond naming parameters. They explain verbatim writing, empty-means-unchanged semantics, keyword comma conventions, the at-least-one requirement, and password-protected rejection behavior.

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 ('Set') and resource ('PDF Metadata') and enumerates the exact fields affected (Title, Author, Subject, Keywords). It is immediately distinguishable from sibling tools like pdf_get_metadata and pdf_remove_metadata by the write/update action.

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?

The description gives explicit constraints: at least one field must be provided or the request is rejected. Parameter-level guidance further clarifies when NOT to use this tool (to clear a field, use pdf_remove_metadata) and how to handle password-protected PDFs (run pdf_unlock first).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources