# find_doc_text (https://sellersheetai.com/docs/mcp-api/tools/find_doc_text)

> Find every occurrence of a text substring and return its index ranges.

Access: **READ** · toolset google_workspace · family null

Use this before calling update_doc_text_style to apply styles to specific words/phrases without computing indices by hand.

## Call it

MCP tool call:

```json
{
  "name": "find_doc_text",
  "arguments": {
    "documentId": "<documentId>",
    "needle": "<needle>"
  }
}
```

Tool API (early access — contact us):

```bash
curl -X POST https://api.sellersheetai.com/api/v1/tools/find_doc_text \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"documentId":"<documentId>","needle":"<needle>"}'
```

## Arguments

| Name | Type | Required | Description |
|---|---|---|---|
| `documentId` | string | yes | the Google Docs document ID. |
| `needle` | string | yes | Literal text to find (not regex). |
| `matchCase` | boolean |  | If True, case-sensitive match. |

## Result

- { matches: [{startIndex, endIndex, text}, ...], count: N }

## Gotchas

- Searches top-level body paragraphs one styled run at a time: text inside tables, headers or footers, or a phrase whose words carry different styles (e.g. half bold), returns no match — replace_doc_text still reaches it.