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); HTM...
AI agents use export to create or update resources in Safe Docx — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Safe Docx environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
format | string | — | Output format: 'markdown' (default, writes .md), 'html' (writes .html), or 'plaintext' (writes .txt). |
file_path | string | — | Path to the DOCX or ODT file. |
output_path | string | — | Where to write the rendering. Defaults to the source path with the format extension. |
allow_overwrite | boolean | — | Overwrite output_path if it already exists. Default: false. |
include_markdown | boolean | — | Include the rendered content (under `content`) in the response. Default: true; set false for large documents. |
Parameters from the server's own tool schema.
The tool creates a new file on disk by exporting/converting a DOCX document to another format. This is a Write operation (creating a new file), not Read (despite also returning content), not Destructive (original file is not deleted or overwritten), and not Execute.
From the tool's definition 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
Risk signalsAccepts file system path (file_path)
Documented attack patterns abuse exactly the kind of access export gives an agent:
PolicyLayer is an MCP gateway — it sits between your AI agents and Safe Docx, and nothing reaches the server without passing your rules. This is the rule we recommend for export:
{
"version": "1",
"default": "deny",
"tools": {
"export": {
"limits": [
{
"counter": "export_rate",
"window": "minute",
"max": 30,
"scope": "grant"
}
]
}
}
} export stays usable, but capped — an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
Free to start. No card required.
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. It is categorised as a Write tool in the Safe Docx MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
export accepts 5 parameters: format, file_path, output_path, allow_overwrite, include_markdown. The full parameter table on this page comes from the server's own tool schema.
Register the Safe Docx MCP server in PolicyLayer and add a rule for export: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Safe Docx. Nothing to install.
export is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the export rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for export. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
export is provided by the Safe Docx MCP server (@usejunior/safe-docx). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Start from Safe Docx, add the rest of your stack, and see everything your agents can call. Then put policy on all of it.
Free to start. No card required.
24 Safe Docx tools catalogued and risk-classified — across an index of 43,000+ MCP servers.