Skip to main content
Glama

Test an automation rule

test_rule
Read-only

Check whether a draft or saved rule (the shape get_rule returns) would match a sample message, and which actions would run. Nothing is sent to customers or saved to the workspace. For an intent rule the same AI check as live runs within the workspace's test limits (it uses one test from that allowance), only for an owner or admin whose connection may also make changes; with an API key or a Read-only connection only the keywords are checked. conditions.hours limits a rule to business hours or to outside them, e.g. {"tz":"Asia/Jakarta","days":["mon","tue","wed","thu","fri"],"from":"09:00","to":"17:00","when":"outside"} for an away message (to may be 24:00; from > to spans midnight). conditions.contactCooldown ("1h", "6h", "24h", "7d" or "30d"; leave out for every time) limits the rule to one run per person per period, counted per person per channel.

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": {
      "rule": "<rule>",
      "sample": "<sample>"
    },
    "name": "test_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleYesThe rule: trigger, conditions, actions (name optional).
sampleYes

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?

Annotations only say readOnly/non-destructive; the description adds what actually matters: nothing is sent to customers or persisted, and an intent-rule test consumes one test from the workspace allowance (consistent with idempotentHint=false). It also discloses degraded behavior based on credential type, which the agent cannot infer from annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and safety guarantee are front-loaded in the first two sentences, but a single dense paragraph then absorbs detailed rule-schema semantics that arguably belong with the rule resource. It is informative yet heavier than a tool description needs to be.

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 read-only two-parameter tool with no output schema, it covers the essentials: what is evaluated, what comes back in the sense of match and actions, side-effect freedom, quota cost, and permission-dependent behavior. Only the exact result shape and the remaining rule conditions are left implicit.

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?

The sample object is largely documented in the schema, but the rule object is effectively undocumented there (free-form properties) and the description compensates by explaining conditions.hours (tz/days/from/to/when, 24:00 and midnight-spanning) and conditions.contactCooldown values. It only covers two of the rule's conditions, so the compensation is partial rather than complete.

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: 'Check whether a draft or saved rule (the shape get_rule returns) would match a sample message, and which actions would run.' It anchors the input to a sibling (get_rule) and distinguishes itself from dry-run-adjacent tools like simulate_flow by naming the rule/match/actions output.

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?

Makes clear this is a dry-run of a rule against a single sample message, and gives the key preconditions (owner/admin for the AI check on intent rules, only keyword checking with an API key or Read-only connection). It stops short of explicitly naming alternatives, but the get_rule reference gives enough routing context.

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.