Set (replace) text
set_textReplace the entire text of a shape or table cell in Google Slides. Works on empty placeholders, clears with empty text, and accepts row and column indexes for table cells.
Instructions
Replaces the ENTIRE text of a shape or table cell: one atomic batch of deleteText(ALL) + insertText. If the target has no text yet the delete is skipped automatically, so it works on empty placeholders too. An empty text just clears the object. Replacing text drops per-character styling — restyle with update_text_style afterwards if needed. For a table cell pass row_index + column_index together.
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": {
"presentation_id": "<presentation_id>",
"object_id": "<object_id>",
"text": "<text>"
},
"name": "set_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The new full text; empty string clears the object. \n starts a new paragraph. | |
| object_id | Yes | The shape or table object id (from list_slides). | |
| row_index | No | Table cell row (0-based; requires column_index). | |
| column_index | No | Table cell column (0-based; requires row_index). | |
| presentation_id | Yes | The presentation id — the long id from the URL (docs.google.com/presentation/d/<presentationId>/edit) or from create_presentation output. |