Skip to main content
Glama

Create rule

createRule

Create a mail rule on the active connection: conditions over an inbound message, and what should happen to anything matching them. THE RULE IS CREATED DISABLED. It does nothing to any mail until a person turns it on, because a rule that archives or forwards should not start doing that on the strength of a chat message. Call testRule next to show which of the last thirty days’ messages it would have caught, read the rule back, and only then ask whether to enable it with setRuleEnabled. Rules run in order and a new one goes last: reorderRules changes the order, updateRule edits a rule and deleteRule removes it.

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": {
      "name": "<name>",
      "conditions": "<conditions>",
      "actions": "<actions>"
    },
    "name": "createRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
matchNoall
actionsYes
conditionsYes
descriptionNoA note on what the rule is for, shown under its name in the app.
stopProcessingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the critical behavioral trait that the rule is created disabled and does nothing until a person enables it, with the rationale that archiving or forwarding should not start from a chat message. It also discloses rule ordering semantics: rules run in order and a new rule goes last.

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 front-loaded with the most important behavioral fact ('THE RULE IS CREATED DISABLED') and then gives concrete workflow and sibling routing. Every sentence adds useful context: safety rationale, verification steps, ordering, and alternative tools.

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 complex mutation tool with no output schema, the description covers the crucial behavioral context: disabled-by-default creation, verification workflow, rule ordering, and related tools. However, it leaves the shape of the nested conditions/actions and parameters like match and stopProcessing to an under-described schema, so the picture is not fully complete.

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

Parameters2/5

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

Schema description coverage is only 17%, so the description needs to compensate for largely undocumented parameters. It only gives a conceptual summary of 'conditions' and 'actions' and does not explain match, stopProcessing, description, condition field/op semantics, or how action values work, leaving the agent to infer most parameter behavior from enum values alone.

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?

The description states a specific verb and resource: 'Create a mail rule on the active connection', and explains that the rule consists of conditions and actions. It also explicitly names related sibling tools (testRule, setRuleEnabled, reorderRules, updateRule, deleteRule), making the boundary between creating and managing rules clear.

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 gives an explicit follow-up workflow: call testRule to preview what the last thirty days of messages would have caught, read the rule back, then ask whether to enable it with setRuleEnabled. This is unusually strong guidance about when and how to use the tool relative to alternatives.

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.