Skip to main content
Glama
ExaDev

document-mcp

by ExaDev

Write document metadata

metadata_write

Set title, author, subject, and keywords on a document without altering other fields or converting format. Requires source and target formats to match.

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.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv2.1.8
    • changedInput schema / properties / source / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "path": {
      -        "description": "Filesystem path to the document to read. The document format is inferred from the file extension.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "path"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "bytesBase64": {
      -        "description": "Base64-encoded document bytes.",
      -        "type": "string"
      -      },
      -      "format": {
      -        "description": "The document format of bytesBase64 -- required, since inline bytes carry no filename to infer it from.",
      -        "enum": [
      -          "docx",
      -          "pptx",
      -          "xlsx",
      -          "odt",
      -          "odp",
      -          "ods",
      -          "odg",
      -          "odf",
      -          "markdown",
      -          "pdf"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "bytesBase64",
      -      "format"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "path": {
      +        "description": "Filesystem path to the document to read. The document format is inferred from the file extension.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "path"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "bytesBase64": {
      +        "description": "Base64-encoded document bytes.",
      +        "type": "string"
      +      },
      +      "format": {
      +        "description": "The document format of bytesBase64 -- required, since inline bytes carry no filename to infer it from.",
      +        "enum": [
      +          "docx",
      +          "pptx",
      +          "xlsx",
      +          "odt",
      +          "odp",
      +          "ods",
      +          "odg",
      +          "svg",
      +          "odf",
      +          "csv",
      +          "markdown",
      +          "pdf"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "bytesBase64",
      +      "format"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / targetFormat / enum
      Previous value: -[
      -  "docx",
      -  "pptx",
      -  "xlsx",
      -  "odt",
      -  "odp",
      -  "ods",
      -  "odg",
      -  "odf",
      -  "markdown",
      -  "pdf"
      -]New value: +[
      +  "docx",
      +  "pptx",
      +  "xlsx",
      +  "odt",
      +  "odp",
      +  "ods",
      +  "odg",
      +  "svg",
      +  "odf",
      +  "csv",
      +  "markdown",
      +  "pdf"
      +]
  2. Addedv1.1.6

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations provided, the description carries full responsibility for disclosing behavior. It clearly states it leaves other fields/flags as-is, does not convert format, and rejects odf outright. It could add more detail about side effects or error handling, but the key constraints are well-communicated.

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 3 sentences, front-loaded with the core action, then constraints, then actionable advice. No fluff, every sentence provides new 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?

For a patching tool with 7 parameters and no output schema, the description is thorough: it explains the exact semantic of the setters, the format matching constraint, rejection of odf, and a path forward. Sibling tools confirm it's part of a document handling suite, and the description aligns well with that context.

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 description coverage is 100%, so parameters are already documented. The description adds value by clarifying that omitted set* fields remain unchanged ('leave it exactly as the source document already has it') and that targetFormat must match the source format, which is not fully obvious from the enum alone. This complements 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 clearly states the tool 'patches a document's own title/author/subject/keywords' and explicitly differentiates from format conversion, which distinguishes it from sibling tools like convert_document and metadata_read. It accurately reflects the name and title.

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?

It explicitly states when not to use (odf rejection, format mismatch) and provides direct guidance to convert first if needed, naming the alternative tool category. This gives clear when/to/not-to use instruction.

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

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