check_badge
Read or assert a Chrome extension's action icon badge text and background color, including per-tab checks, to verify badge state during automated extension testing.
Instructions
Read or assert the extension icon badge text and background color from chrome.action.
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": {
"action": "<action>"
},
"name": "check_badge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | get: return current badge text and color; assert_text: check badge text equals expected; assert_color: check badge background color matches expected RGBA | |
| tab_id | No | Tab ID to scope the badge check (optional, defaults to global badge) | |
| expected_text | No | Expected badge text (for assert_text) | |
| expected_color | No | Expected RGBA color array e.g. [255, 0, 0, 255] (for assert_color) |