text_search
Search text within a specific InDesign story using a GREP pattern; returns match positions and context.
Instructions
Search text within a story using a GREP pattern, returning match positions and context
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": {
"storyIndex": "<storyIndex>",
"pattern": "<pattern>"
},
"name": "text_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | GREP search pattern | |
| timeout | No | ||
| maxResults | No | ||
| storyIndex | Yes | ||
| document_id | No | Which open document to act on: a name (see document_listOpen) or a 0-based index. Defaults to the front document. |