Read and write Microsoft Word (docx) files effortlessly. Utilize powerful tools to manipulate document content, including editing paragraphs and inserting new text. Enhance your document processing capabilities with a simple command-line interface.
Tools
read_docx
Read complete contents of a docx file including tables and images.Use this tool when you want to read file endswith '.docx'.Paragraphs are separated with two line breaks.This tool convert images into placeholder [Image].'--- Paragraph [number] ---' is indicator of each paragraph.
edit_docx_paragraph
Make text replacements in specified paragraphs of a docx file. Accepts a list of edits with paragraph index and search/replace pairs. Each edit operates on a single paragraph and preserves the formatting of the first run. Returns a git-style diff showing the changes made. Only works within allowed directories.
write_docx
Create a new docx file with given content.Editing exisiting docx file with this tool is not recomended.
edit_docx_insert
Insert new paragraphs into a docx file. Accepts a list of inserts with text and optional paragraph index. Each insert creates a new paragraph at the specified position. If paragraph_index is not specified, the paragraph is added at the end. When multiple inserts target the same paragraph_index, they are inserted in order. Returns a git-style diff showing the changes made.