safe-docx
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| read_fileA | Read document content (DOCX, ODT, or Google Doc). Output is token-limited (~14k tokens) by default with pagination metadata (has_more, next_offset). Use offset/limit to paginate. |
| grepA | Search paragraphs with regex. Use file_path for session-based search, file_paths for stateless multi-file search, or google_doc_id for Google Docs. ODT supported via file_path (single-file) only. |
| batch_editA | Single-agent front door for applying multiple edit steps (replace_text, insert_paragraph) to a document in one call. Validates all steps first, rejects conflicts before applying anything, then executes valid steps sequentially. Accepts inline steps or a plan_file_path JSON array. |
| replace_textA | Replace text in a paragraph by provider paragraph id, preserving formatting where supported. Supports DOCX, ODT, and Google Docs. |
| insert_paragraphA | Insert a paragraph before/after an anchor paragraph by paragraph id. Supports DOCX, ODT, and Google Docs. (ODT paragraph ids are positional and shift after insertion — re-read before further edits.) |
| saveB | Save document. For DOCX: saves clean and/or tracked changes output. For ODT: saves an .odt package. For Google Docs: checkpoint (default) returns revisionId, or snapshot exports as DOCX. |
| exportA | 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 |
| convert_to_odtA | Convert a DOCX document to OpenDocument Text (.odt) using the native model-to-model converter (no LibreOffice involved). Writes the .odt (default: source path with the .odt extension), validates ODF packaging safety before writing, and returns the output path plus a |
| format_layoutB | Apply layout controls (paragraph spacing, table row height, cell padding). Google Docs supports paragraph spacing only. |
| accept_changesA | Accept all tracked changes in the document body, producing a clean document with no revision markup. Returns acceptance stats. |
| has_tracked_changesA | Check whether the document body contains tracked-change markers (insertions, deletions, moves, and property-change records). Read-only. |
| get_file_statusA | Get file/session metadata including edit count, normalization stats, and cache info. Supports DOCX, ODT, and Google Docs. |
| close_fileA | Close an open file session, or close all sessions with explicit confirmation. Supports DOCX, ODT, and Google Docs. |
| add_commentA | Add a comment or threaded reply to a document. Provide target_paragraph_id + anchor_text for root comments, or parent_comment_id for replies. Supports DOCX and ODT (ODT backs comments with office:annotation; threaded replies are DOCX-only). |
| get_commentsA | Get all comments from the document with IDs, authors, dates, text, and anchored paragraph IDs. Range-anchored DOCX comments also expose optional end_paragraph_id, start_run_index, start_char_offset, end_run_index, and end_char_offset fields describing the covered span. Includes threaded replies (DOCX). Supports DOCX and ODT. Read-only. |
| delete_commentA | Delete a comment and all its threaded replies from the document. Cascade-deletes all descendants. |
| compare_documentsB | Compare two documents and produce a tracked-changes output document. Provide original_file_path + revised_file_path for standalone comparison, or file_path to compare session edits against the original. DOCX and ODF (.odt) support both modes. DOCX stats count insertions/deletions as contiguous ranges, expose atom totals as insertedAtoms/deletedAtoms, and report formatChanges separately from modifiedParagraphs. ODF compares at inline granularity (a modified paragraph is marked up in place — only the changed spans are struck or inserted). |
| get_footnotesA | Get all footnotes from the document with IDs, display numbers, text, and anchored paragraph IDs. Read-only. |
| add_footnoteA | Add a footnote anchored to a paragraph. Optionally position the reference after specific text using after_text. Note: [^N] markers in read_file output are display-only and not part of the editable text used by replace_text. |
| update_footnoteA | Update the text content of an existing footnote. |
| delete_footnoteB | Delete a footnote and its reference from the document. |
| clear_formattingA | Clear specific run-level formatting (bold, italic, underline, highlight, color, font) from paragraphs. |
| extract_revisionsA | Extract tracked changes as structured JSON with before/after text per paragraph, revision details, and comments. Supports pagination via offset and limit. Read-only - does not modify the document. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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