Medium Risk

export

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...

How to control export ↓

What export does on Safe Docx

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.

ParameterTypeRequiredDescription
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.

Medium Risk

Why export needs a policy

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:

How to control export

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:

policy.json
{
  "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.

  1. Create a free account and register Safe Docx — nothing to install.
  2. Add this policy — paste it, or build it visually.
  3. Point your MCP client (Claude, Cursor, anything) at your gateway URL.
LIMIT THIS TOOL →

Free to start. No card required.

Related tools and policies

Go deeper

Questions about export

What does the export tool do? +

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.

What parameters does export accept? +

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.

How do I enforce a policy on export? +

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.

What risk level is export? +

export is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit export? +

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.

How do I block export completely? +

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.

What MCP server provides export? +

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.

Enforce policy on every Safe Docx tool call.

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.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.