Skip to main content
Glama
ExaDev

document-mcp

by ExaDev

Build document from package

from_package

Rebuild real document bytes from a DocumentPackage JSON, producing the requested target format.

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.
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the read-side round-trip behavior and that it produces 'real document bytes,' but it does not mention side effects (e.g., writing to a file if outputPath is provided) or any limitations. The description is accurate but could add more detail about the tool's behavior beyond the basic operation.

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

Conciseness4/5

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

The description is a single sentence that front-loads the action and includes a clarifying example (--dump-package-equivalent). It is dense but not wordy, and every part adds context. A minor structural improvement would be splitting into two sentences for readability, but it remains concise and well-focused.

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 tool has a nested input schema and no output schema, but the description explains the core purpose and the round-trip context. The inline vs. file output behavior is covered in the schema's output parameter, so the description does not need to repeat it. The description is complete enough for an agent to understand when and how to use the tool, though it could mention fallback behavior or error handling.

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 tool description does not add parameter-specific meaning beyond the schema, but it does provide high-level context about the DocumentPackage JSON. The schema itself contains detailed descriptions (e.g., the 'format' field being unused by this tool), so the description's contribution is marginal but not absent.

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 uses a specific verb ('Rebuilds') and a clear resource ('real document bytes from a DocumentPackage previously serialised to JSON'), and explicitly frames itself as 'the read side of the DocumentPackage round trip,' which distinguishes it from conversion tools like convert_document. The title and description align well.

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 clearly implies when to use it: after a DocumentPackage has been serialized to JSON (e.g., via a --dump-package-equivalent step). It does not explicitly name alternatives or say 'use this instead of X,' but the round-trip context is sufficient for an agent to infer the appropriate use case.

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