Skip to main content
Glama
langmail-mcp

langmail-mcp

Official
by langmail

Update mail rule

update_mail_rule

Update an existing mail rule while preserving its ID and history: rename, enable/disable, change condition matching, or replace conditions and actions; optionally apply it to existing mail.

Instructions

Update an existing mail rule while keeping its id and history: rename it, enable or disable it, change how conditions combine (match), or replace its conditions or actions. Only the provided fields change; conditions/actions replace the current ones wholesale when given. Optionally applies the updated rule to existing mail via existingMail (same confirmation policy as create_mail_rule). Find the id with list_mail_rules.

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": {
      "ruleId": "<ruleId>"
    },
    "name": "update_mail_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoOptional human-readable rule name, e.g. "Archive GitHub Notifications".
matchNoHow multiple conditions combine: "all" = every condition must match (AND), "any" = one is enough (OR).
ruleIdYesThe id of the rule to update, as returned by create_mail_rule or list_mail_rules.
actionsNoReplacement action list (replaces all current actions, in order).
enabledNoEnable (true) or disable (false) the rule without deleting it.
conditionsNoReplacement conditions (replace all current conditions; at least one required when given).
existingMailNoOptionally apply the UPDATED rule to existing mail after saving, same policy as create_mail_rule.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, destructive=false, idempotent=false) by disclosing partial-update semantics ('Only the provided fields change') and the non-obvious destructive subtlety that conditions/actions are replaced wholesale when given. It also surfaces the 200-message confirmation gate indirectly through the existingMail policy, which an agent needs before triggering a bulk apply.

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 capability list is front-loaded in the first sentence, followed by the two caveats that actually change behavior (partial update, wholesale replacement) and the id-lookup pointer. Five sentences, none redundant, and no restatement of the tool name or title.

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 7-parameter mutation with nested conditions/actions and no output schema, the description covers the update scope, replacement semantics, id discovery, and the optional bulk-apply policy. The only gap is that it never says what is returned after the update (the rule object vs. an apply summary), which would matter given the existingMail side effects.

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 coverage is 100%, so the schema already documents ruleId, match, existingMail modes and the action variants in detail. The description reinforces the wholesale-replacement meaning of conditions/actions and the existingMail policy but adds no syntax or format meaning the schema lacks, so baseline 3 applies.

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 (update an existing mail rule) and enumerates the exact facets it can change: name, enabled, match, conditions, actions. It also distinguishes itself from create_mail_rule by emphasizing 'existing' and 'keeping its id and history', so an agent can tell the two apart 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 an explicit entry path ('Find the id with list_mail_rules') and defers to create_mail_rule's confirmation policy for existingMail, which anchors the workflow. It does not state when to prefer delete_plus_create or how it relates to preview_mail_rule, but the operational context it does supply is clear and correct.

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