Skip to main content
Glama
mail-mcp

mail-mcp

by honest-magic

set_filter

Destructive

Create or replace a SIEVE filter script on a self-hosted mail server via ManageSieve to set up server-side email filtering with valid SIEVE syntax.

Instructions

Create or replace a SIEVE filter script on the server via ManageSieve. The script content should be valid SIEVE syntax. Only available on self-hosted mail servers — Gmail and Outlook do not support ManageSieve.

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>",
      "name": "<name>",
      "content": "<content>"
    },
    "name": "set_filter"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe name for the SIEVE script (e.g. "spam-filter")
contentYesValid SIEVE script content
accountIdYesThe ID of the account to use
confirmationIdNoConfirmation token from a prior confirmation-required response. Required to execute write operations when server is in --confirm mode.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, and "create or replace" is consistent with that — the overwrite behavior implied by "replace" is the destructive trait being flagged. Beyond the annotations, the description contributes the ManageSieve platform restriction and the SIEVE-syntax validity requirement, both of which affect whether a call succeeds. It stops short of saying what happens to an existing script's previous contents or how failures surface.

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?

Two sentences, no filler, with the operation and its scope stated first and the availability caveat second. Every clause carries information an agent would otherwise have to guess.

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 mutation tool with no output schema, the definition covers the operation, the validity requirement, and the platform restriction, while annotations carry the destructive profile and the schema documents the confirmation flow. The remaining gap is the absence of any statement about overwrite consequences or error behavior when the script is rejected.

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 100%, so all four parameters including the confirmationId confirmation token are already documented, and the baseline would be 3. The description adds a small amount beyond that by emphasizing that the content payload must be valid SIEVE syntax and by situating the script on the server, but it does not clarify naming collisions or the accountId/name relationship.

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?

"Create or replace a SIEVE filter script on the server via ManageSieve" gives a specific verb (create/replace), a specific resource (SIEVE filter script), and the underlying protocol. It is clearly distinguishable from get_filter/delete_filter/list_filters siblings, though it never routes the agent explicitly by naming any of them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description supplies one hard precondition — self-hosted servers only, Gmail/Outlook unsupported — which is genuinely useful for tool selection. It does not state when to prefer this over delete_filter or list_filters, nor explain the replace semantics (that an existing script of the same name is overwritten) or when confirmation is demanded.

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