Find text and get its index ranges
docs_findLocate exact text in a document and return index ranges for each match, providing measured indices for formatting or deletion instead of guessed positions.
Instructions
Locate exact text and return document index ranges for each match. This is the safe way to obtain indices for docs_format or docs_delete — they are measured now rather than guessed, and matches spanning formatting boundaries are handled. Indices are valid only until the next edit.
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": {
"document": "<document>",
"text": "<text>"
},
"name": "docs_find"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | Tab id or title, for documents with several tabs. Reads default to the first tab; writes to a multi-tab document REQUIRE this rather than guessing. Get ids from docs_describe. | |
| text | Yes | Exact text to locate. | |
| limit | No | Maximum matches to return. Default 50. | |
| account | No | Google account to act as. Optional when one is authorised or a default is set. | |
| document | Yes | Document URL or file id. Both accepted. |