Skip to main content
Glama
@marlinjai/email-mcp

@marlinjai/email-mcp

by marlinjai

email_create_block_rule

Create a standing block rule to intercept future matching emails before they reach the inbox, using sender, subject, or header patterns and choosing delete or junk.

Instructions

Create a standing rule that intercepts future mail matching a pattern, before it reaches the inbox. Use headerContains (e.g. matching a Reply-To domain) to block a spam template family whose visible "From" domain rotates — matching the rotating domain directly stops working within days. Not supported on iCloud/generic IMAP (no standard server-side rule mechanism exists across IMAP servers). Outlook requires the MailboxSettings.ReadWrite scope — accounts authenticated before this tool existed need to re-run the setup wizard once to re-consent.

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": {
      "accountId": "<accountId>",
      "matchType": "<matchType>",
      "value": "<value>",
      "action": "<action>"
    },
    "name": "email_create_block_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYesThe domain, address, or text to match
actionYesdelete: discard on arrival. moveToJunk: on Outlook, files straight to the Junk Email folder; on Gmail, skips the inbox (archives) — Gmail's filter API cannot proactively apply the SPAM label, only its own classifier can, so this is the closest a standing rule can actually do there.
accountIdYes
matchTypeYessenderDomain/senderAddress: match the From address. subjectContains: match the subject. headerContains: match any header's raw content — the right choice for a stable element (e.g. a Reply-To domain) when the From domain rotates.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.11.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does substantial work: it discloses that the rule is server-side and standing, names the unsupported platforms (iCloud/generic IMAP), and flags the Outlook MailboxSettings.ReadWrite scope plus the re-consent requirement for pre-existing accounts. It omits what the call returns, behavior on duplicate/conflicting rules, and whether the rule is idempotent.

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-loads the core action in the first sentence, then layers the matchType rationale and the platform/auth caveats. Every sentence carries operational information, though the consent-wizard sentence is long and could be tightened. No filler or restatement of the tool 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 4-required-parameter mutation tool with no annotations and no output schema, the description covers the highest-risk unknowns: platform support and auth scope. It leaves gaps around return value, conflict/duplicate handling, and interaction with existing rules listed by the sibling email_list_block_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 coverage is 75%, so baseline would be 3, but the description adds genuine meaning beyond the schema by explaining *why* headerContains beats senderDomain for rotating spam templates. The action enum values are already well documented in the schema itself, so the description's added value is concentrated on matchType selection.

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 standing rule that intercepts future mail matching a pattern' — and adds the crucial timing detail ('before it reaches the inbox'), which separates it from a simple block/sender-mute. The resource (block rule) is distinct enough from the sibling forward-rule and delete-block-rule tools that an agent can route correctly.

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 strong in-tool guidance on which matchType to pick (headerContains when the From domain rotates) and an explicit when-not ('Not supported on iCloud/generic IMAP'). It does not explicitly route to tool-level alternatives such as email_delete_block_rule or email_list_block_rules, but the exclusions and match strategy are clearer than most.

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