handle_consent
Accept, deny, or dismiss a cookie-consent banner on a session page in one call, detecting common consent platforms or matching button text when markup is unknown.
Instructions
Accept, deny, or dismiss the cookie-consent banner on a session page in one call. Detects the CMP (Complianz, Cookiebot, CookieYes, OneTrust, Borlabs, Usercentrics, Didomi, Osano, Iubenda, Klaro, Cookie Notice, Cookie Law Info, Moove GDPR, Quantcast, Termly, HubSpot) by its markup, else falls back to button text in English/Slovenian/German/Croatian/Italian/Spanish/French inside cookie/consent containers. Returns {found, cmp, clicked, banner_gone}; a page with no banner is success with found=false. Also available as open_session(consent=...) and the 'consent' step.
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": {
"session_id": "<session_id>",
"action": "<action>"
},
"name": "handle_consent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | What to do with the banner (default: accept) | |
| observe | No | What to return about the resulting page. 'screenshot' (default): full-page image. 'none': structured result only, no image — cheapest, use through setup steps of a flow. 'map': semantic page map (get_page_map — token-light, best for 'what can I do next?'). 'checks': run_checks_on_session output (a11y/seo/perf/etc.). | screenshot |
| session_id | Yes | Session ID |