Skip to main content
Glama

Set consent

set_consent
Destructive

Record an opt-in or opt-out from your own system (CRM, checkout, a form). An opt-in for a marketing registration needs proof (source, when, the page).

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

Input Schema

NameRequiredDescriptionDefault
noteNoA note kept on the consent record
phoneYesE.164 number
proofNoOpt-in evidence (Messaging Policy 1.4). Accepted only with status opted_in.
statusYesopted_in or opted_out
campaign_idNoOnly with opted_in: the registration the person opted in to. A marketing send from a number linked to that registration looks for this record. Proof is required when its use case is marketing or mixed (400 otherwise). An opt-out is always account-wide.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / note / description
      Added value: +"A note kept on the consent record"
    • addedInput schema / properties / proof / properties / campaign_id / description
      Added value: +"The registration the opt-in is for (reg_...)"
    • addedInput schema / properties / proof / properties / ip / description
      Added value: +"The person's IP address when they opted in"
    • addedInput schema / properties / proof / properties / registration_id / description
      Added value: +"The registration the opt-in is for (reg_...)"
    • addedInput schema / properties / proof / properties / source / description
      Added value: +"How the opt-in was collected"
    • addedInput schema / properties / proof / properties / user_agent / description
      Added value: +"The person's browser user agent when they opted in"
    • addedInput schema / properties / status / description
      Added value: +"opted_in or opted_out"
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=false, so the safety profile is covered. The description adds one real behavioral rule (marketing opt-ins need proof) but never explains consequences — that an opt-out is account-wide, whether an existing record is overwritten, or what causes rejection beyond proof. Notably it does not reconcile the mild verb "Record" with destructiveHint=true.

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

Conciseness5/5

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

Two sentences, zero filler, with the core action first and the conditional proof requirement second. Nothing repeats the title or restates the obvious.

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 5-parameter tool with a nested proof object, no output schema, and annotations covering safety, the description covers the main pitfall (marketing opt-in requires proof). It stops short of describing overwrite semantics or the account-wide scope of an opt-out, which matter for a destructive mutation.

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 coverage is 100%, so the baseline is 3. The description's "source, when, the page" briefly maps to proof.source, proof.collected_at and proof.page_url, adding a little orientation, but says nothing about phone, status, note, or the campaign_id linkage that carries most of the operational nuance.

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

Purpose4/5

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

Specific verb+resource: "Record an opt-in or opt-out" with the origin framed as "your own system (CRM, checkout, a form)". An agent can distinguish this from get_consent / export_consent / import_opt_outs on read-vs-write grounds, but no sibling is named explicitly.

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

Usage Guidelines3/5

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

The parenthetical origin examples imply this is for consent collected outside the messaging platform, but there is no explicit when-not guidance and no mention of how this differs from import_opt_outs (bulk) or how inbound keyword opt-ins should be routed. Usage is inferable, not stated.

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.