Skip to main content
Glama
InfiniteRoomLabs

gmail-ai-mcp

create_filter

Create Gmail filters automatically from a declarative spec object: define criteria and actions (e.g., add labels), and the tool validates and submits the filter. Forwarding filters are not supported.

Instructions

Create a Gmail filter from a declarative spec object.

spec is {criteria: {...}, action: {...}} (snake_case keys, e.g. add_label_ids). Validated before submission. forward actions are rejected over MCP -- create forwarding filters with the CLI instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses a hard platform restriction (forward actions rejected), a pre-submission validation step, and calls out the fact that the operation creates a filter. It doesn't discuss permissions or side effects beyond creation, but the core mutation and limitation are visible.

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?

The description is only three sentences, front-loads the core verb/object, and uses code formatting for the spec shape. Every sentence adds either invocation or exclusion information, with no filler.

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 one-parameter nested-object tool with no annotations, the description covers the essential invocation details, the critical restriction, and the alternative path; the output schema covers return values. It could add more detail about permissible criteria/action keys, but the given example and structure are sufficient for a first call.

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

Parameters5/5

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

The input schema only says 'spec' is an object with additionalProperties, so the description adds essential meaning: spec is {criteria: {...}, action: {...}}, uses snake_case keys, and cites add_label_ids as an example. This turns an opaque generic object into an actionable structure.

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?

Description opens with the specific verb 'Create' and resource 'Gmail filter', immediately distinguishing it from sibling get/delete/list tools. The phrase 'from a declarative spec object' further defines the operation's input style.

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?

It explicitly states when the tool is not appropriate: forward actions are rejected over MCP, and it names the alternative ('create forwarding filters with the CLI instead'). It also notes validation occurs before submission, clarifying the expected failure behavior.

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