Skip to main content
Glama
ExaDev

document-mcp

by ExaDev

Build document from package

from_package

Rebuild a real document in a target format from a previously serialized DocumentPackage JSON, either from a file path or inline base64 bytes, and write it to disk or receive it inline.

Instructions

Rebuilds real document bytes in a target format from a DocumentPackage previously serialised to JSON (e.g. by a caller's own --dump-package-equivalent step) -- the read side of the DocumentPackage round trip a conversion's onDocument callback produces.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputNoWhere to write the resulting document. Omit entirely (or omit outputPath within it) to receive the bytes inline instead.
sourceYesThe DocumentPackage JSON to read. 'path' points at a JSON file on disk -- its extension is never used to infer a document format, since the file holds a DocumentPackage, not a document. 'bytesBase64' carries the JSON inline; its 'format' field is required by the shared hybrid input shape but unused by this tool.
targetFormatYesThe document format to build from the DocumentPackage.

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

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions rebuilding bytes and being the read side of a round trip, but fails to note practical behaviors such as writing to outputPath vs returning inline bytes, potential overwriting, or that the 'format' field in source is unused. This lack of transparency could lead an agent to make incorrect assumptions about side effects.

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

Conciseness3/5

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

The description is a single, dense sentence that packs technical terminology. It is not overly long, but it is not front-loaded with the most accessible information and could be split into clearer sentences. The jargon reduces conciseness from a readability standpoint.

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

Completeness3/5

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

The description provides useful conceptual context about the round-trip workflow, which helps an agent understand when and why this tool exists. However, it omits practical details like output modes (file vs inline) and any prerequisites or limitations. The rich schema covers parameters, but the lack of annotations and output schema means the description should offer more operational context. It is adequate but with clear gaps.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds the round-trip context but does not enrich parameter meanings beyond what the schema already provides. The schema already explains fields like 'source', 'targetFormat', and 'output' in detail, so the description's contribution here is minimal.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Rebuilds real document bytes in a target format from a DocumentPackage previously serialised to JSON', which is a specific verb+resource. It also frames it as the 'read side of the DocumentPackage round trip', distinguishing it from sibling conversion tools. However, the jargon ('DocumentPackage', 'onDocument callback') may not be immediately accessible to all agents, so it misses a perfect score.

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

Usage Guidelines3/5

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

Usage is implied through the round-trip context and reference to a prior '--dump-package-equivalent step', but there is no explicit guidance on when to use this tool versus alternatives like convert_document or when to avoid it. The description would benefit from a direct statement like 'Use when you have a serialized DocumentPackage JSON and need to reconstruct a document.'

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