Skip to main content
Glama

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

NameRequiredDescriptionDefault
actionYesWhat to do with the banner (default: accept)
observeNoWhat 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_idYesSession ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.12.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden, and it does substantial work: it lists the 16 CMPs detected by markup, states the multilingual text fallback, and defines the return shape {found, cmp, clicked, banner_gone}. It does not explain the failure path when a banner is found but no matching button can be clicked, nor that accepting persists cookies and alters session state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action sentence, then detection behavior, then return contract, then alternatives. The 16-vendor enumeration is long but earns its place as detection scope; the language list is slightly padded but still informational.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly spells out the return object and the important no-banner-is-success semantics. Remaining gap is the partial-failure case (banner present but button not clicked), which an agent would want to know before relying on the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the action enum is already fully documented in the schema, so the schema does the heavy lifting. The description adds no extra meaning for observe or session_id beyond what the structured fields provide; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb set (accept/deny/dismiss) against a specific resource (cookie-consent banner on a session page) in one call. It also names the sibling entry points that do the same thing (open_session(consent=...), the 'consent' step), so an agent can place it precisely in the toolset.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear usage context: it is the one-shot way to resolve a banner, with alternatives named. It stops short of saying when to prefer this over open_session(consent=...) or the 'consent' flow step, so the routing decision is left partly to the caller.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.