Skip to main content
Glama

gmail_unsubscribe

Unsubscribe from a Gmail mailing list or newsletter using Gmail’s built-in unsubscribe action; requires confirm=true and fails when no unsubscribe header exists.

Instructions

Unsubscribe from a mailing list / newsletter with Gmail's own Unsubscribe (outward, irreversible).

Gmail offers it only for messages with a recognised unsubscribe header; otherwise the op fails with not_found and lists the available actions.

Requires confirm=true (outward-facing or destructive).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNoRow index from gmail.list / gmail.search; omit to use the open conversation.
queryNoRun this Gmail search first and take `index` from its results.
folderNoOpen this folder/label first and take `index` from it.
confirmNoMust be true: this action is outward-facing or destructive.
keep_unreadNoIf the conversation was unread, mark it unread again afterwards.
message_indexNoMessage of the thread (0 = oldest, numbering of gmail.read); default the last.
expect_subjectNoSafety check: the conversation's subject must contain this text (case-insensitive), otherwise nothing is done (not_found).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations present, the description carries the load and does so well: it discloses that the effect is outward-facing and irreversible, states the confirm=true requirement, and describes the not_found failure mode. It doesn't say what happens to the message afterwards (archived, labelled, left in place), which is the main remaining behavioral gap.

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?

Three short, front-loaded sentences: purpose and risk first, precondition second, confirmation requirement last. No padding or restatement of the name.

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 7-parameter destructive action with no annotations and no output schema, the description covers the two things an agent most needs: the confirm gate and the not_found behavior. Missing only the post-action effect and whether the operation is scoped to the whole thread versus a single message.

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 all seven parameters including index/query/folder, message_index, and expect_subject are already self-documenting; the description only reinforces the confirm=true gate that the schema also states. Baseline 3 applies since the description adds no new parameter semantics.

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 ('Unsubscribe from a mailing list / newsletter') and scopes it to 'Gmail's own Unsubscribe', which separates it from sibling mutators like gmail_block_sender, gmail_trash, or gmail_mute 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 Guidelines4/5

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

Gives a clear precondition for use: only messages with a recognised unsubscribe header qualify, otherwise the op fails with not_found and lists available actions. It stops short of naming alternatives such as gmail_block_sender for lists that lack the header, so the routing guidance is contextual rather than exhaustive.

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