Skip to main content
Glama

create_mail_rule

Destructive

Create a SuperMailbox rule for future incoming mail. At least one sender, recipient or subject condition is required; all supplied conditions must match. The first enabled matching rule wins. Actions may move future messages to another folder, Trash, Junk, or add a supported Gmail label. This does not create a provider-native filter or change historical mail.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
actionYes
enabledYes
accountIdYesConnected mailbox ID returned by list_mail_accounts.
conditionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=false, openWorld=true, so the safety profile is partly carried structurally. The description adds real value beyond that: the rule only affects future incoming mail, historical mail is untouched, and evaluation precedence is first-enabled-match-wins. It does not state what happens when no rule matches or on validation failure, keeping it short of a 5.

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?

Four sentences, zero filler, front-loaded with the core action and followed by constraints, precedence and scope limitations in descending order of importance. Every sentence carries information an agent needs to call the tool correctly.

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 5-required-parameter mutation tool with nested condition and action objects and no output schema, the description covers purpose, valid inputs, precedence, and side-effect boundaries well. It is slightly incomplete on the post-call picture: no hint of what a successful create returns (rule id?) or what happens on conflicting/duplicate rules.

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 description coverage is only 20% (accountId alone is documented), so the description must compensate, and it largely does: it maps the undocumented action enum variants to behavior (move to another folder, Trash, Junk, supported Gmail label) and explains that conditions are an OR-of-required-fields with AND semantics across supplied ones. It says nothing about name length constraints or that the label variant consumes folderId, so gaps remain.

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 ("Create a SuperMailbox rule") plus its temporal scope ("for future incoming mail"), which cleanly separates it from list_mail_rules, update_mail_rule and delete_mail_rule. It further disambiguates with an explicit negative: it does not create a provider-native filter or touch historical mail, so the agent can rule out adjacent interpretations without opening a 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 the key gating prerequisite (at least one sender/recipient/subject condition, all conditions must match) and the resolution rule (first enabled match wins), which is the context needed to author a rule. It offers partial when-not guidance via the provider-native-filter and historical-mail exclusions, but never points at an alternative sibling for creating native filters.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources