| "Write me a report / proposal / outline / draft / 写一份" (no current content matters) | office_build_paragraphs | Single call. Pass the full structure as an array of paragraphs each with its own style and list mode. Do NOT call office_get_document_outline or office_get_document_text first — the document is empty or will be replaced. |
| "Rewrite this paragraph / make this concise" (selection-driven) | office_replace_selection | Read selection with office_get_selection only if you need surrounding context. |
| "Change all X to Y" (global text edit) | office_find_replace | One call. Don't pre-read the full text. |
| "Edit paragraph N / the second heading" | office_replace_paragraph_by_index | Call office_get_document_outline first to map text to paragraph index. |
| "Add a comment / review note / 批注" | office_add_comment | For "comment on this paragraph / the selected text", OMIT anchor so the whole selection is covered. Pass anchor only to target a different specific phrase (first match, that substring only). |
| "Reply to / resolve comments" | office_get_comments → office_reply_comment / office_resolve_comment | |
| "Summarize / explain / 总结 / 解释" | office_get_document_outline first, then office_get_document_text only for the sections the user asked about | Never load full text just to summarize a large doc. |
| "Make this bold / italic" | office_apply_inline_format | |
| "Make this Heading 2 / Quote" | office_apply_paragraph_style | |
| "Turn these lines into a bullet / numbered list" | office_apply_list | Or pass `list: "bullet" |
| "Accept / reject 修订 / tracked changes" | office_get_revisions then office_resolve_revision({ index, action: "accept"|"reject" }) | For "全部接受 / accept all changes", pass action: "accept-all" AND confirmAcceptAll: true only after the user explicitly asks for it. Requires WordApiDesktop 1.1+. |
| "Add / insert a link / 加链接 / hyperlink" | office_insert_hyperlink | Pass anchor to wrap an existing phrase; omit to wrap the current selection. displayText overrides what the link shows. |
| "Insert image / 插入图片" | office_insert_image | Bytes must already be base64-encoded — pi-office does NOT fetch URLs. Always include altText unless the image is purely decorative. |
| "Make a new table / 做个表 / N × M table" | office_build_table | Single call with a 2D array. Use office_set_cell only to update an existing table. |
"诊断 / debug / 排查 / 为什么连不上 / /pioffice:doctor" | office_doctor | Read-only. Prints a multi-line health report; show the full result back to the user verbatim so they can act on the ✗ rows. |