Skip to main content
Glama

unsubscribe

Idempotent

Opt out of a mailing list via the sender's one-click HTTPS endpoint, taken solely from the thread message header; returns alternatives when no automated option exists.

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, or being contacted right now by another call, is reported with duplicateOf and NOT contacted again — safe to retry after a timeout. Pass force:true for a deliberate second attempt after a finished one (e.g. the endpoint answered 500); it does not override a call still running. 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. Changed2 schema fields changedv0.32.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv0.25.0
    • removedInput schema / additionalProperties
      Removed value: -false
  3. Changed2 schema fields changedv0.14.0
    • addedInput schema / properties / force
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / duplicateOf
      Added value: +{
      +  "type": "string"
      +}
  4. Addedv0.9.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare openWorldHint=true and readOnlyHint=false, but the description adds substantially more: an outbound HTTPS request with up to 3 redirects, the fact that this is the only non-Google host contacted, that it confirms the address is live, that the response body is discarded, that mailto: opt-outs are never attempted, and that duplicates yield `duplicateOf` without re-contacting. These are exactly the side effects an agent needs before firing an irreversible outbound request.

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 mechanism, then cleanly partitioned into USE WHEN / DO NOT USE / SIDE EFFECTS blocks. Dense but almost every clause carries decision-relevant information; a few parentheticals (e.g. the redirect count) could be trimmed without loss.

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 tool with real-world irreversible side effects, an output schema, and two undocumented parameters, the description covers everything an agent needs: what gets contacted, what is never contacted, what happens on failure (returns `unsubscribed:false` with `options`, not an error), and the duplicate/retry model.

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 parameters. It fully explains `force` (deliberate second attempt after a completed call, does not override an in-flight call), but `threadId` is only implied by 'the mailing list a thread came from' rather than explicitly identified as the required thread identifier.

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 and resource plus the exact mechanism: 'Unsubscribe from the mailing list a thread came from, via the sender's RFC 8058 one-click endpoint.' It also explicitly forecloses a wrong mental model ('deliberately no URL parameter'), which separates it from any tool that might accept a target URL.

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?

Contains explicit USE WHEN ('the user wants off a newsletter'), explicit DO NOT USE with the named alternative ('to check whether unsubscribing is possible (use list_unsubscribe — it contacts nobody)'), and workflow pairing guidance with archive/trash/create_filter for existing mail. Retry and force semantics are spelled out with the exact triggering condition (endpoint answered 500).

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