1---2name: docx-process3description: This skill should be used when the user asks to create, edit, format, query, or manipulate Word documents (.docx files). It provides routing guidance for the docx_process MCP tool, including all available routes and their parameter specifications.4---56# Word Document Processing78Use `docx_process(route="<route>", params={...})` to perform operations.910For detailed parameter specs, read the reference file in the same directory as this skill:11- `references/doc-management.md` — Document management (create, open, save, close, reload)12- `references/content-operations.md` — Content addition and editing (paragraphs, headings, tables, search/replace)13- `references/table-operations.md` — Table operations (rows, columns, merge, split, borders, shading)14- `references/formatting.md` — Formatting (page layout, paragraph, text, styles)15- `references/annotations-query.md` — Annotations (bookmarks, comments, footnotes) and queries1617## Route Quick Reference1819### Document Management20| Route | Description |21|---|---|22| create_document | Create new document (`file_path`) |23| open_document | Open existing document (`file_path`) |24| save_document | Save to original path |25| save_as_document | Save as new file (`new_file_path`) |26| create_document_copy | Copy with suffix (`suffix`, default `"-副本"`) |27| close_document | Close without saving |28| reload_document | Reload from disk |2930### Content Addition31| Route | Description |32|---|---|33| add_paragraph | Add paragraph (`text`, formatting opts) |34| add_heading | Add heading (`text`, `level` 1-9) |35| add_table | Add table (`rows`, `cols`, `data`) |36| add_list_item | Add list item (`text`, `list_type`, `level`) |37| add_image | Insert image (`image_path`, `width`, `height`) |38| add_page_break | Insert page break |39| add_section | Add section (`orientation`, dimensions, margins) |40| add_table_of_contents | Insert TOC field (`title`) |4142### Content Editing43| Route | Description |44|---|---|45| search_text | Search text (`keyword`) |46| search_and_replace | Search & replace with preview (`keyword`, `replace_with`, `preview_only`) |47| find_and_replace | Simple find & replace (`find_text`, `replace_text`) |48| replace_section | Replace under heading, keep format (`section_title`, `new_content`, `preserve_title`) |49| edit_section_by_keyword | Replace around keyword, keep format (`keyword`, `new_content`, `section_range`) |50| delete_paragraph | Delete paragraph (`paragraph_index`) |51| delete_text | Delete text range (`paragraph_index`, `start_pos`, `end_pos`) |52| edit_table_cell | Edit cell (`table_index`, `row_index`, `col_index`, `text`) |5354### Table Operations55| Route | Description |56|---|---|57| add_table_row | Add row (`table_index`, `data`) |58| add_table_column | Add column (`table_index`, `col_index`, `data`) |59| delete_table_row | Delete row (`table_index`, `row_index`) |60| delete_table_column | Delete column (`table_index`, `col_index`) |61| merge_table_cells | Merge cells (`table_index`, `start_row`, `start_col`, `end_row`, `end_col`) |62| split_table | Split after row (`table_index`, `row_index`) |63| set_table_borders | Set table borders (`table_index`, `color`, `size`) |64| set_cell_shading | Set cell background (`table_index`, `row_index`, `col_index`, `color`) |6566### Formatting — Page Layout67| Route | Description |68|---|---|69| set_page_margins | Set margins (`top`, `bottom`, `left`, `right`, `section_index`) |70| set_page_orientation | Set orientation (`orientation`, `section_index`) |71| set_page_size | Set page size (`preset` or `width`+`height`, `section_index`) |72| set_header | Set header text (`text`, `section_index`) |73| set_footer | Set footer text (`text`, `section_index`) |74| set_columns | Set column layout (`num_columns`, `space`, `section_index`) |75| add_page_number | Add PAGE field to footer (`section_index`) |7677### Formatting — Paragraph & Text78| Route | Description |79|---|---|80| set_line_spacing | Set line spacing (`spacing`, `paragraph_index`) |81| set_paragraph_spacing | Set spacing & indent (`paragraph_index`, `space_before`, `space_after`, `first_line_indent`) |82| set_paragraph_format | Modify formatting (`paragraph_index`, bold/italic/font/size/color/alignment) |83| set_paragraph_text | Replace text keeping format (`paragraph_index`, `text`) |84| set_paragraph_border | Set borders (`paragraph_index`, `top_style`/`left_style`/`bottom_style`/`right_style` + opts) |85| set_paragraph_shading | Set background (`paragraph_index`, `color`) |86| set_text_highlight | Set highlight (`paragraph_index`, `color`) |87| set_text_strikethrough | Set strikethrough (`paragraph_index`, `double`) |88| set_superscript | Set superscript (`paragraph_index`) |89| set_subscript | Set subscript (`paragraph_index`) |90| set_text_direction | Set direction (`paragraph_index`, `direction`) |91| add_tab_stop | Add tab stop (`paragraph_index`, `position`, `alignment`) |92| add_hyperlink | Add hyperlink (`paragraph_index`, `text`, `url`) |93| set_cell_format | Format cell (`table_index`, `row_index`, `col_index`, formatting opts) |9495### Styles96| Route | Description |97|---|---|98| create_style | Create style (`style_name`, `style_type`, formatting opts) |99| modify_style | Modify style (`style_name`, formatting opts) |100| list_styles | List styles (`style_type`) |101102### Annotations & Query103| Route | Description |104|---|---|105| add_bookmark | Add bookmark (`paragraph_index`, `bookmark_name`) |106| add_comment | Add comment (`paragraph_index`, `text`, `author`) |107| add_footnote | Add footnote (`paragraph_index`, `text`) |108| add_endnote | Add endnote (`paragraph_index`, `text`) |109| get_document_info | Get metadata |110| get_paragraph | Get paragraph detail (`paragraph_index`) |111| get_table_cell | Get cell content (`table_index`, `row_index`, `col_index`) |112| get_page_info | Get page layout (`section_index`) |