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

> Find every occurrence of `needle` and apply the given text style.

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

Combines find_doc_text + update_doc_text_style in one call.

## Call it

MCP tool call:

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

Tool API (early access — contact us):

```bash
curl -X POST https://api.sellersheetai.com/api/v1/tools/style_doc_text_by_match \
  -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. |
| `matchCase` | boolean |  | Case-sensitive match. |
| `bold` | boolean |  | set true or false; omit to leave as is. |
| `italic` | boolean |  | set true or false; omit to leave as is. |
| `underline` | boolean |  | set true or false; omit to leave as is. |
| `strikethrough` | boolean |  | set true or false; omit to leave as is. |
| `fontSize` | number |  | points. |
| `fontFamily` | string |  | e.g. 'Arial'. |
| `foregroundColor` | object[] |  | [r, g, b] in 0–1. |
| `backgroundColor` | object[] |  | [r, g, b] in 0–1. |
| `linkUrl` | string |  | make every match a link to this URL. |

## Result

- { matches: N }

## Example

- make every occurrence of "SellerSheet" bold and blue: style_doc_text_by_match( documentId=..., needle="SellerSheet", bold=True, foregroundColor=[0.12, 0.35, 0.85], )

## Gotchas

- Matches through find_doc_text's search, so text inside tables, headers or footers, or a phrase split across differently-styled runs, is not styled (matches: 0).