Tools reference
- Written for
- + Written for
- Deprecated
- + Deprecated
- Applies to
- + Applies to
Tools reference
Every tool registered by @cookiemunch/mcp (packages/mcp/src/tools.ts), grouped the way the server registers them. Each tool wraps one @cookiemunch/sdk call (or a short sequence of them) and returns its JSON result as the tool's text content; SDK errors are caught and returned as an isError result rather than crashing the MCP session. See Setup for how to connect a client.
Note: every tool acts on the org tied to the configured API key — no tool accepts an
orgId. Admin tools (invite_member,set_member_role,remove_member,issue_api_key) require an unscoped key, exactly like the REST routes they call — see API keys, members, webhooks & usage.
Sites & config
Tool | What it does | Inputs |
|---|---|---|
| Return the identity tied to the API key: orgId, plan, key prefix. | — |
| List all sites (cbids) in your organization. | — |
| Create a new site. The cbid is auto-generated if omitted. |
|
| Delete a site and its configuration from your org. |
|
| Get the banner/consent configuration for a site. |
|
| Upsert (merge) the banner/consent configuration for a site. |
|
| Verify domain control via dns / meta / file challenge. Required to unlock consent export and signed receipts. |
|
| Extract theme colors/typography from a site's homepage to suggest a matching banner theme. |
|
| Get the exact |
|
Consent & privacy
Tool | What it does | Inputs |
|---|---|---|
| Aggregated per-day consent statistics for a site. |
|
| Recent anonymised consent records for a site. |
|
| Export a site's consent log as raw CSV text. |
|
| Fetch the signed consent receipt for one consent record, by stamp. |
|
| Irreversibly crypto-erase a data subject's consent records by receipt stamp (GDPR/CCPA deletion). |
|
| Export a data subject's consent records (GDPR access/portability). |
|
| Save/update an end-user's consent preferences (purpose → boolean map). |
|
| List configurable consent preferences/purposes for your org. | — |
DSAR
Tool | What it does | Inputs |
|---|---|---|
| List all Data Subject Access Requests for your organization. | — |
| Open a new DSAR. |
|
| Advance a DSAR to a new status. |
|
Governance (vendors & RoPA)
Tool | What it does | Inputs |
|---|---|---|
| List vendors (processors) with their computed risk scores. | — |
| Register a vendor and compute its risk score. |
|
| List Records of Processing Activities for your organization. | — |
| Create a RoPA entry. |
|
Cookies & scanning
Tool | What it does | Inputs |
|---|---|---|
| List the cookies discovered on a site, with their consent categories. |
|
| Trigger a cookie scan for a site. Returns the scan job state. |
|
| Get the status/result of a site's most recent cookie scan. |
|
| Get A/B banner experiment results (per variant) for a site. |
|
v2 banner flow editing
Tool | What it does | Inputs |
|---|---|---|
| Get the v2 banner flow config for a site (views, categories, lint issues). |
|
| Apply a batch of structured edit ops ( |
|
| Wholesale-replace a site's v2 flow with a complete config (e.g. from a template). Validates before PUT. |
|
Structured v1 config (non-flow domains)
Each of these fetches the current config, patches only its own slice, and PUTs — safe to call without clobbering unrelated settings.
Tool | What it does | Inputs |
|---|---|---|
| Configure script-blocking mode. |
|
| Set geo-targeting rules (banner mode per country/region). |
|
| Configure i18n: default culture, auto-detect, per-locale copy overrides. |
|
| Configure Google Consent Mode signals. |
|
| Configure the A/B banner experiment. |
|
| Configure consent persistence (re-prompt policy). |
|
| Configure v1 banner appearance: type, layout, theme, copy. |
|
Org, members & keys
Tool | What it does | Inputs |
|---|---|---|
| List the members of your organization. | — |
| Invite a person to your org by email. |
|
| Change a member's role. The owner's role cannot be changed. |
|
| Remove a member. The owner cannot be removed. |
|
| List API keys for your org (secrets are never returned). | — |
| Issue a new API key. The secret is returned once. | — |
| Get the current usage/quota summary for your organization. | — |
Webhooks
Tool | What it does | Inputs |
|---|---|---|
| List webhook subscriptions for your organization. | — |
| Create a webhook subscription. The response includes the signing secret (shown once). |
|
| Delete a webhook subscription by id. |
|
Brand kits
Tool | What it does | Inputs |
|---|---|---|
| List reusable brand kits (colors/logo/typography) for your org. | — |
| Create a reusable brand kit. |
|
| Delete a brand kit by id (must belong to your org). |
|
Banner library
Tool | What it does | Inputs |
|---|---|---|
| List reusable banner designs in your org. | — |
| Create a reusable banner design. |
|
| Get a banner design by id. |
|
| Update a banner design's name and/or config. |
|
| Delete a banner design (fails if still assigned to sites). |
|
| Set which sites (cbids) use a banner design. |
|
| Publish a design live to all its assigned sites. |
|
Example session
Once the server is connected, an agent can chain tools naturally:
User: Create a site for shop.example.com, install it, and open a GDPR
access request for jane@example.com.
Agent calls: create_site({ domain: "shop.example.com" })
-> get_install_snippet({ cbid: "site_9f01ab" })
-> create_dsar({ type: "access", subjectEmail: "jane@example.com", regulation: "gdpr" })Every call above is a thin wrapper over the identically-named SDK method — if a tool's behavior is ambiguous, its underlying client.* call and REST route are the source of truth.