Skip to main content
Glama

Set PDF metadata

pdf_set_metadata
Idempotent

Write document info fields (title, author, subject, creator, keywords) into a PDF. Give at least one; an empty string sets an empty value. Unicode is fine. Keywords may be a list or a comma-separated string. The output is saved unencrypted. Use pdf_metadata to read the current values. Returns the result inline as an application/pdf resource; the source is never modified.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pdf_path": "<pdf_path>"
    },
    "name": "pdf_set_metadata"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNo
authorNo
creatorNo
subjectNo
keywordsNoComma-separated string or list of keywords
passwordNoPassword to open the input, only needed for a user-password PDF (owner-locked files with an empty user password open without it).
pdf_pathYesPDF source: an https:// URL or a data:application/pdf;base64,… URI (this hosted server cannot read local file paths).

Output Schema

NameRequiredDescriptionDefault
bytesYesSize of the produced PDF in bytes
resource_uriNopdfops:// uri of the inline application/pdf resource

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare idempotent=true and destructive=false, and the description adds genuinely non-obvious behavior on top: the output is saved *unencrypted* (protection is dropped in the result), the source file is never modified, and the response comes back inline as an application/pdf resource. The unencrypted-output disclosure is exactly the kind of side effect an agent cannot infer from any structured field.

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?

Five short sentences, front-loaded with the action, then constraints, then the read alternative, then the return/side-effect note. No restatement of the title and no filler; every sentence carries an actionable fact.

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?

For a 7-parameter mutation tool this is complete: it covers input constraints, the empty-string edge case, encryption side effects, source immutability, and the read-sibling routing. An output schema exists, yet the description still clarifies the inline resource return, which is a bonus rather than padding.

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 only 43%, so compensation is needed, and the description supplies it: at least one info field required, an empty string sets an empty value, Unicode is accepted, and keywords may be a list or comma-separated string. The password parameter's semantics are left entirely to the schema's own description, and the 1000-char limits are not mentioned, so it stops short of full coverage.

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 ('Write document info fields... into a PDF') and enumerates the exact fields it touches (title, author, subject, creator, keywords). It also names the read counterpart pdf_metadata, so an agent can separate this from its sibling without inspecting either schema.

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?

"Give at least one" establishes a real usage constraint not present in the schema (only pdf_path is required), and "Use pdf_metadata to read the current values" routes the agent to the correct alternative for the read case. It lacks an explicit 'do not use this for rotation/protection/watermarking' exclusion, but the field list implicitly bounds it.

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.