Skip to main content
Glama

export

Convert a DOCX file to Markdown, HTML, or plain text and save it to disk. Get the file path, byte count, and rendered content.

Instructions

Export a document to a portable rendering (Markdown, semantic HTML, or plain text). Writes an output file (default: source path with the format extension, e.g. .md, .html, or .txt) and returns its path, byte count, and the rendered content (under content). Intentionally lossy (no round-trip); HTML is the semantic tier, not pixel-faithful. DOCX only — Google Docs is not supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNoPath to the DOCX or ODT file.
formatNoOutput format: 'markdown' (default, writes .md), 'html' (writes .html), or 'plaintext' (writes .txt).
output_pathNoWhere to write the rendering. Defaults to the source path with the format extension.
allow_overwriteNoOverwrite output_path if it already exists. Default: false.
include_markdownNoInclude the rendered content (under `content`) in the response. Default: true; set false for large documents.
Behavior5/5

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

Beyond annotations (both false), the description details output file writing, return values (path, byte count, content), lossy behavior, and semantic HTML nature. This fully discloses behavioral traits.

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?

Three sentences, front-loaded with main action, no wasted words. Every sentence provides essential information: purpose, output behavior, and limitations.

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?

Given 5 parameters and no output schema, the description covers all needed context: formats, output file behavior, return values, and constraints (DOCX only, lossy). It is fully sufficient for agent understanding.

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 default output path behavior and the return of rendered content under 'content', which clarifies the include_markdown parameter's effect.

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 exports a document to Markdown, HTML, or plain text. It distinguishes from siblings like convert_to_odt by focusing on rendering formats, and specifies DOCX-only, providing a specific verb and resource.

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 gives clear context (DOCX only, not Google Docs) but does not explicitly state when to use this tool over alternatives. However, siblings are distinct, so it is sufficient for guiding usage.

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/UseJunior/safe-docx'

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