create_comment
Add a comment anchored to specific text in a Word document for annotation or review.
Instructions
Add a comment anchored to specific text in a Word document.
Args: path: Path to the .docx file anchor_text: Text to anchor the comment to (must exist and be unique in document) comment_text: The comment content author: Comment author name (default: "Claude") output_path: Save to new file; if omitted, creates timestamped backup and overwrites original
Returns: Dictionary containing: - success: True if successful - comment_id: ID of the created comment - anchored_to: The text the comment is anchored to - paragraph: Index of the paragraph containing the anchor - output_path: Path where the file was saved
Errors: - If anchor text is not found: {"success": false, "error": "Anchor text not found in document"} - If anchor text appears multiple times: {"success": false, "error": "Anchor text appears N times; provide more context for unique match"}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"anchor_text": "<anchor_text>",
"comment_text": "<comment_text>"
},
"name": "create_comment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| author | No | Claude | |
| anchor_text | Yes | ||
| output_path | No | ||
| comment_text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||