Skip to main content
Glama

unsubscribe

Idempotent

Opt out of a newsletter via the sender's RFC 8058 one-click endpoint taken from the message's List-Unsubscribe header, and report plain-link or mailto fallbacks when none is offered.

Instructions

Unsubscribe from the mailing list a thread came from, via the sender's RFC 8058 one-click endpoint. There is deliberately no URL parameter: the endpoint is taken from the message's own List-Unsubscribe header and nowhere else. Only https one-click endpoints are called (fixed request body, response body discarded); a plain link is reported for the user to open, and a mailto: opt-out is never performed because mailwarden cannot send mail. If the sender offers nothing automatable this returns unsubscribed:false with the alternatives in options — it is not an error. USE WHEN: the user wants off a newsletter. Pair with archive/trash or create_filter to deal with mail already in the mailbox. DO NOT USE: to check whether unsubscribing is possible (use list_unsubscribe — it contacts nobody). A sender already contacted in this session is reported with duplicateOf and NOT contacted again — safe to retry after a timeout. Pass force:true for a deliberate second attempt (e.g. the endpoint answered 500). SIDE EFFECTS: makes an outbound HTTPS request to the sender's unsubscribe endpoint (plus up to 3 redirects) — the only non-Google host mailwarden ever contacts. This confirms to the sender that the address is live, and it cannot be undone. The mailbox itself is not changed.

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": {
      "threadId": "<threadId>"
    },
    "name": "unsubscribe"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNo
threadIdYes

Output Schema

NameRequiredDescriptionDefault
urlNo
fromYes
reasonNo
statusNo
optionsYes
threadIdYes
messageIdYes
duplicateOfNo
unsubscribedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed2 schema fields changedv0.14.0
    • addedInput schema / properties / force
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / duplicateOf
      Added value: +{
      +  "type": "string"
      +}
  3. Addedv0.9.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses the outbound HTTPS call to a non-Google host, up to 3 redirects, fixed request body, discarded response body, that mailto: opt-outs are never performed, that the sender learns the address is live and it cannot be undone, and that the mailbox itself is unchanged. Also documents the duplicateOf dedupe behavior and force:true for a deliberate retry, which the idempotentHint alone does not convey.

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-loads the mechanism, then USE WHEN / DO NOT USE / SIDE EFFECTS in labeled blocks, so it is scannable. It is on the long side for a two-parameter tool, but nearly every sentence carries decision-relevant information.

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?

An output schema exists, yet the description still pre-empts the key non-error outcome (unsubscribed:false with alternatives in `options`) so the agent does not treat it as a failure. For an irreversible external side effect, the safety and retry picture is complete.

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

Parameters4/5

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

Schema coverage is 0%, so the description must carry the load: it explains force as a deliberate second attempt (e.g. after a 500) and clarifies that threadId selects the thread whose message header supplies the endpoint. It also explains the deliberate absence of a URL parameter, but threadId's format is still left to inference.

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 (unsubscribe) plus the exact mechanism (the sender's RFC 8058 one-click endpoint derived from the List-Unsubscribe header). This is distinguishable from siblings like list_unsubscribe and bulk_unsubscribe without opening any 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?

Explicit USE WHEN (user wants off a newsletter) and DO NOT USE (to check feasibility — use list_unsubscribe, which contacts nobody), plus pairing advice with archive/trash/create_filter for existing mail. Alternatives and exclusions are named, not implied.

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