style_doc_text_by_match
Find every occurrence of `needle` and apply the given text style.
writeGoogle Sheets, Docs & Drive
Combines find_doc_text + update_doc_text_style in one call.
Call it
In an AI client (MCP)
{
"name": "style_doc_text_by_match",
"arguments": {
"documentId": "<documentId>",
"needle": "<needle>"
}
}From code (Tool API)
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>"}'Early access — the Tool API is open on request, contact us.
Arguments
| Name | Type | Description |
|---|---|---|
documentIdrequired | string | the Google Docs document ID. |
needlerequired | string | Literal text to find. |
matchCase | boolean | Case-sensitive match.Default: false |
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
Every tool answers {notification, data, human_action}; data carries:
- { 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).