Skip to main content
Glama
ExaDev

document-mcp

by ExaDev

Write document metadata

metadata_write

Patch a document's title, author, subject, and keywords without altering other metadata or the file format.

Instructions

Patches a document's own title/author/subject/keywords, leaving every other field and every other flag as-is. Does not convert format -- the source document's own format and targetFormat must match (or both be 'pdf'); odf (a standalone formula document) is rejected outright as either a source or a target, since it has no write path back out at all. Convert the document to a different format first (e.g. with a documents.js conversion tool) if metadata needs to be set on the result of a format change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputNoWhere to write the patched document. Omit entirely to receive the bytes inline, base64-encoded.
sourceYesThe document to patch metadata on.
setTitleNoSet the title field. Omit to leave it exactly as the source document already has it.
setAuthorNoSet the author field. Omit to leave it exactly as the source document already has it.
setSubjectNoSet the subject field. Omit to leave it exactly as the source document already has it.
setKeywordsNoSet the keywords field. Omit to leave it exactly as the source document already has it.
targetFormatYesThe format to write the patched document back out as -- must match the source document's own format (or both be 'pdf'). metadata_write never converts format.
Behavior4/5

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

With no annotations provided, the description carries the transparency burden and does so well. It discloses the non-conversion behavior, the format-matching requirement, the outright rejection of odf, and that unmodified fields are preserved. It could add output/return semantics, but those are covered by the schema.

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 description is three sentences with no filler. It front-loads the core action, then gives constraints and actionable guidance, every sentence earning its place.

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?

For a 7-parameter tool with nested objects and no output schema, the description covers the core behavior, edge cases, and conversion workflow. It does not explain the output/inline byte behavior, but the schema already documents the output object sufficiently.

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 baseline is 3. The description adds value by explaining which fields are unaffected and by flagging odf as an invalid source or target even though the schema enum includes it, plus reinforcing the targetFormat matching constraint.

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 clearly identifies the tool as patching a document's own title/author/subject/keywords while leaving all other fields and flags untouched. This specific verb+resource framing distinguishes it from sibling tools like metadata_read and convert_document.

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 provides clear usage context: it is for metadata patching without format conversion. It gives explicit exclusions (odf rejected, format must match) and suggests converting first via a documents.js conversion tool when format changes are needed, though it does not explicitly name metadata_read for read-only inspection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ExaDev/document-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server