Skip to main content
Glama

Cooper Email

Test inbox rules

cooper_test_rule
Read-onlyIdempotent

Use this to see which rules would match a stored message, and which actions would run or be skipped, without changing mail. Read-only; requires auth and message_read. Inputs: inbox_id (required), message_id (required), and optional name, conditions, actions, and stop_processing. With only message_id, every enabled rule on the inbox is tested in order. With conditions or actions, that unsaved rule is tested and nothing is stored. Returns {object:"inbox_rule_test", message_id, data:[{rule_id, name, matched, actions, skipped, stop_processing}]}. skipped entries look like auto_reply:list. No labels, folder, forward, or reply is written. An unknown message is HTTP 404 message_not_found.

Input Schema

NameRequiredDescriptionDefault
nameNoName for an unsaved rule. Default Preview.
actionsNoActions for an unsaved rule. Omit to test stored rules.
inbox_idYesInbox id (inb_…), username, or full email address owned by this key
conditionsNoConditions for an unsaved rule. Omit to test stored rules.
message_idYesStored message id (msg_…) in this inbox.
stop_processingNostop_processing for an unsaved rule.

Output Schema

NameRequiredDescriptionDefault
dataNo[{rule_id, name, matched, actions, skipped, stop_processing}] per rule.
objectNoObject type name, such as list, message, or thread.
message_idNoMessage id (msg_…) this result refers to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Which rules would match a message. Nothing is changed.",
      +  "properties": {
      +    "data": {
      +      "description": "[{rule_id, name, matched, actions, skipped, stop_processing}] per rule."
      +    },
      +    "message_id": {
      +      "description": "Message id (msg_…) this result refers to."
      +    },
      +    "object": {
      +      "description": "Object type name, such as list, message, or thread."
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: required auth/scope (auth and message_read), the explicit no-side-effect guarantee ('No labels, folder, forward, or reply is written'), the 404 message_not_found failure mode, and the skipped-entry format ('auto_reply:list'). These are behavioral facts the readOnlyHint/destructiveHint annotations do not convey.

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-loaded with purpose and safety, then modes, then return, then error — a logical order with no filler sentences. Minor deduction because the literal return-object sketch duplicates the existing output schema and could have been dropped.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter tool with nested objects, the description covers both invocation modes, the auth prerequisite, the zero-write guarantee, and the primary error case. An agent has everything needed to select and call it correctly even though the output schema already documents the response.

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 baseline is 3, but the description clarifies the interaction the schema only hints at: conditions/actions switch the call from testing stored rules to testing an unsaved rule, and the optional name/stop_processing belong to that unsaved-rule mode. That interplay is genuine added meaning; it does not add format detail for the nested conditions/actions objects.

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 — test which inbox rules would match a stored message — and immediately pins the dry-run framing ('without changing mail'), which distinguishes it from cooper_create_rule, cooper_update_rule, and cooper_list_rules without opening any 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 clear branching guidance: with only message_id it tests every enabled rule in order, with conditions/actions it tests an unsaved rule and stores nothing. It does not explicitly name the sibling alternatives (e.g. list_rules to inspect stored rules, create_rule to persist), so it stops just short of full when-not/alternative routing.

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.