Skip to main content
Glama
gmail-mcp

gmail-mcp

gmail_create_filter

Create an idempotent Gmail filter from criteria like query, sender, subject, or attachments and apply actions such as adding/removing labels, marking read, starring, or skipping inbox.

Instructions

Create an idempotent Gmail filter from criteria and label actions.

Label names in add_labels and remove_labels are comma-separated. Missing add labels are created after validation; remove labels must already exist.

Sibling tools: use gmail_create_label to configure label visibility first, gmail_list_filters to inspect definitions, and gmail_delete_filter to remove one.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gmail_create_filter"
  }
}

Input Schema

NameRequiredDescriptionDefault
starNo
queryNo
subjectNo
mark_readNo
add_labelsNo
never_spamNo
skip_inboxNo
to_addressNo
from_addressNo
exclude_chatsNo
negated_queryNo
remove_labelsNo
has_attachmentNo
mark_importantNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does disclose two important behaviors: the operation is idempotent, and missing add_labels are auto-created after validation while remove_labels must already exist. It does not state permission/auth requirements, whether anything is destroyed on failure, or what the tool returns for a 14-parameter mutation.

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 paragraphs, each front-loaded with its most important claim: the purpose first, the label-format constraint second, the sibling routing last. No filler or restated field names.

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?

For a 14-parameter tool with no annotations and no output schema, the description covers label semantics and idempotency but leaves the criteria parameters and the boolean action flags undifferentiated, and says nothing about the result of the call. Adequate to start, but an agent would still have to guess at how several parameters interact.

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 0% across 14 parameters, so the description must compensate, and it only partly does: it explains that add_labels/remove_labels are comma-separated and gives the existence/creation asymmetry between them. The other twelve parameters (query, negated_query, from_address, subject, the boolean action flags) get no explanatory text beyond their names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Create an idempotent Gmail filter') and scopes the input surface to 'criteria and label actions'. It is clearly a filter-creation tool rather than a label or listing tool, though the sibling differentiation appears in a separate paragraph rather than being baked into the purpose statement itself.

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?

It names three concrete alternatives and what each is for: gmail_create_label to configure visibility first, gmail_list_filters to inspect definitions, and gmail_delete_filter to remove one. That is real routing guidance; what's missing is an explicit 'do not use this when…' exclusion or a note on when a filter should be updated instead of created.

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