Skip to main content
Glama
gmail-mcp

gmail-mcp

gmail_delete_filter

Preview or delete a Gmail filter by filter_id while preserving its raw restore recipe, so you can remove filter definitions without losing the data needed to recreate them.

Instructions

Preview or delete a Gmail filter while preserving its raw restore recipe.

Discovery: use gmail_list_filters to find and verify the required filter_id.

The restore recipe must be mapped to gmail_create_filter arguments; raw keys such as from and addLabelIds are not accepted directly. Sibling destructive tool gmail_delete_email deletes messages, not filter definitions.

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": {
      "filter_id": "<filter_id>"
    },
    "name": "gmail_delete_filter"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNo
filter_idYes

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?

No annotations exist, so the description carries the full burden, and it delivers meaningful behavior: dry-run preview vs. actual deletion, the preservation of a raw restore recipe, and the warning that raw keys like from/addLabelIds are rejected. It stops short of stating whether deletion is permanent or what permissions/rate limits apply, which leaves a real gap for a destructive operation.

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, then structured as discrete discovery/sibling notes with no filler sentences. The 'raw restore recipe' phrasing is dense and under-explained, which slightly hurts scannability.

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

Completeness3/5

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

There is no output schema and no annotations, so the description should say what a preview returns or what the 'restore recipe' actually looks like; that term is used as if self-evident. Discovery and restore wiring are well covered, but the return shape and irreversibility are not.

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 0%, so the description must compensate. It covers filter_id well (required, must be discovered and verified via gmail_list_filters), but dry_run is never named — the agent must infer that 'preview' maps to dry_run=true. That inference is reasonable but not spelled out.

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 pair (preview/delete) and resource (Gmail filter) plus a distinguishing constraint (preserves raw restore recipe). It explicitly separates itself from gmail_delete_email by noting that tool deletes messages, not filter definitions, so an agent can disambiguate without opening schemas.

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 discovery path (use gmail_list_filters to find and verify filter_id) and an explicit follow-up path (map the restore recipe to gmail_create_filter arguments). It also names the misleading sibling gmail_delete_email and explains why it is not the right choice.

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