modify_doc_text
Modify text in a Google Doc by inserting or replacing content and applying formatting (bold, italic, color, font) at specified positions, with a dry-run option to preview changes.
Instructions
Modifies text in a Google Doc - can insert/replace text and/or apply formatting in a single operation.
Args: user_google_email: User's Google email address document_id: ID of the document to update start_index: Start position for operation (0-based) end_index: End position for text replacement/formatting (if not provided with text, text is inserted) text: New text to insert or replace with (optional - can format existing text without changing it) bold: Whether to make text bold (True/False/None to leave unchanged) italic: Whether to make text italic (True/False/None to leave unchanged) underline: Whether to underline text (True/False/None to leave unchanged) font_size: Font size in points font_family: Font family name (e.g., "Arial", "Times New Roman") text_color: Foreground text color (#RRGGBB) background_color: Background/highlight color (#RRGGBB) dry_run: When True (default), return planned mutations without executing them
Returns: str: Confirmation message with operation details
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": {
"user_google_email": "<user_google_email>",
"document_id": "<document_id>",
"start_index": "<start_index>"
},
"name": "modify_doc_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | ||
| document_id | Yes | ||
| start_index | Yes | ||
| end_index | No | ||
| text | No | ||
| bold | No | ||
| italic | No | ||
| underline | No | ||
| font_size | No | ||
| font_family | No | ||
| text_color | No | ||
| background_color | No | ||
| dry_run | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |