Skip to main content
Glama

set_consent

DestructiveIdempotent

Record or withdraw ONE consent for ONE purpose on a lead or contact — the data the send gate reads. A consent is always for ONE purpose: whoever agreed to the newsletter did not agree to cold outreach, so there is one row per person and purpose and setting it again replaces that row. status 'revoked' is a withdrawal and is NEVER overridable by any role. Optional expires_at: after that date the consent stops counting even while the status still says 'granted' — an unrenewed consent is the most common way to treat an expired one as valid. Every change lands in the audit trail with old and new value.

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": {
      "purpose": "<purpose>",
      "status": "<status>"
    },
    "name": "set_consent"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoFree-text notes
statusYesNew status
channelNoHow it was given: verbal | written | web_form | email.
lead_idNoID of the lead
purposeYesThe purpose, stored in the existing column consent_type. Common values in this system: recording, marketing, data_processing, sms — plus whatever the tenant uses in campaigns (akquise, newsletter, bestandskunde, terminabstimmung, vertrag, rechnung). Must match the purpose used when sending, or the consent will not be found.
proof_urlNoWhere the proof is. Without provenance a consent is worth little in a dispute.
contact_idNoEither lead_id or contact_id.
expires_atNoISO date. Omit for open-ended.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / lead_id / description
      Added value: +"ID of the lead"
    • addedInput schema / properties / notes / description
      Added value: +"Free-text notes"
    • addedInput schema / properties / status / description
      Added value: +"New status"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Beyond annotations it discloses that re-setting replaces an existing row, that 'revoked' is a withdrawal no role can override, that an unrenewed expires_at silently stops counting, and that every change is audited with old and new values. These are substantive behavioral facts an agent could not infer from destructiveHint/idempotentHint alone.

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 core action and scoped with an em-dash clause; each sentence carries distinct information. It is dense and clause-heavy, with a couple of parenthetical asides that could be tightened, but nothing is filler.

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?

For a destructive, non-read-only mutation with 8 params and no output schema, it covers overwrite behavior, irreversibility of revocation, expiry semantics, and audit consequences. It does not address lead_id vs contact_id selection or permission requirements, leaving minor gaps.

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

Parameters5/5

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

Schema coverage is already 100%, yet the description adds genuine meaning: purpose must match the purpose used at send time or the consent is not found, and expires_at means the consent stops counting after that date while status remains 'granted'. That is the highest-value nuance in the tool and it is explained.

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 pair (record/withdraw), the exact resource (one consent for one purpose on a lead or contact), and its role in the system ('the data the send gate reads'). Scope is unambiguous: exactly one row per person and purpose.

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 context for when to call it (recording or withdrawing consent) and the key rule that a consent is always for exactly one purpose, with a concrete example (newsletter vs cold outreach). It does not explicitly route the agent among siblings such as set_marketing_consent, so the when-not guidance is only implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.