Skip to main content
Glama

Add an opt-out

add_opt_out
DestructiveIdempotent

Block a phone number from receiving messages on a channel after a customer opts out. Requires confirm: true so send_message refuses with opted_out.

Instructions

Block a phone number from receiving messages from this account on a channel (POST /api/v1/sms/opt-outs), for example after a customer asks to stop; send_message then refuses it with opted_out. Requires VOBIZ_ENABLE_MESSAGING=true on the server and confirm: true after the user approved blocking this number. Adding a number that is already blocked succeeds without change. The reverse is remove_opt_out; to look before changing, use check_opt_out.

Input Schema

NameRequiredDescriptionDefault
reasonNoNote stored on the record, e.g. 'customer request' (default 'manual').
channelNosms (default; also covers mms), mms or rcs.
confirmYesMust be true after the user approved blocking this number.
phone_numberYesThe number to block, E.164 (leading + optional).

Output Schema

NameRequiredDescriptionDefault
okNoTrue on success; false when the result is an error (then error, message and retryable are set).
channelNoChannel the change applies to: sms, mms or rcs.
opted_outNoAlways true: the number is now blocked.
phone_numberNoThe number, normalised to E.164.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.4.2
    • addedInput schema / properties / phone_number / description
      Added value: +"The number to block, E.164 (leading + optional)."
    • changedInput schema / properties / reason / description
      Previous value: -"Note stored on the record, e.g. 'customer request'."New value: +"Note stored on the record, e.g. 'customer request' (default 'manual')."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "channel": {
      +      "description": "Channel the change applies to: sms, mms or rcs.",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "True on success; false when the result is an error (then error, message and retryable are set).",
      +      "type": "boolean"
      +    },
      +    "opted_out": {
      +      "const": true,
      +      "description": "Always true: the number is now blocked.",
      +      "type": "boolean"
      +    },
      +    "phone_number": {
      +      "description": "The number, normalised to E.164.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv1.1.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, but the description meaningfully extends this: it discloses the server-side env-flag prerequisite, the user-approval gating for confirm, and the cross-tool consequence that send_message will refuse the number with 'opted_out'. The only redundancy is restating idempotency ('adding a number that is already blocked succeeds without change'), which idempotentHint already covers.

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?

Dense single paragraph, front-loaded with the action and endpoint before prerequisites and sibling routing. Every clause carries information, though the sentence is long and could be split for faster scanning.

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

Completeness5/5

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

For a destructive, idempotent mutation with an output schema present, the description supplies everything needed to call it correctly: prerequisites, approval gating, idempotent behavior, and routing to siblings. Return values need not be explained since an output schema exists.

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%, so the schema itself documents reason, channel, confirm with enum and pattern constraints. The description only reinforces the confirm gating condition; it adds no syntax or format detail beyond what the schema provides. Baseline 3 is appropriate.

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+resource ('Block a phone number from receiving messages from this account on a channel') and even cites the endpoint POST /api/v1/sms/opt-outs. It clearly distinguishes itself from the neighboring remove_opt_out and check_opt_out tools, so an agent can select it without consulting either schema.

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

Usage Guidelines5/5

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

Gives an explicit trigger ('for example after a customer asks to stop'), names the reverse operation (remove_opt_out) and the pre-check alternative (check_opt_out) with their respective conditions. Prerequisites (VOBIZ_ENABLE_MESSAGING=true, confirm: true after user approval) are spelled out.

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

Deploy Server

Other Tools