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).

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.5/5.0
Behavior5/5

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

Adds substantial context beyond the readOnly/destructive annotations: nothing is sent to customers or saved, an intent rule consumes a quota unit, and behavior changes by credential (owner/admin triggers the AI check, API key or Read-only connection checks keywords only). That permission-dependent behavior is exactly the kind of trait annotations cannot express.

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-loads the core outcome and the no-side-effects guarantee before the caveats; every clause carries information. The hours sentence is long and example-dense, but the example replaces what would otherwise be several lines of prose.

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?

There is no output schema, and the description says only that it reports matching and which actions would run without describing the return shape or how unmatched conditions are surfaced. Everything needed to call it correctly is present; only the result format is 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?

Schema coverage is 50% and the `rule` object is open (additionalProperties: {}), so the description earns credit by naming the expected rule shape and spelling out conditions.hours with a concrete tz/days/from/to/when example, including the 24:00 and midnight-spanning rules. It does not explain sample.at, but the schema already documents that.

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 rule (the shape get_rule returns) would match a sample message and which actions would run. This is clearly distinguishable from get_rule (retrieval) and simulate_flow (different resource entirely).

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 the key selection context: it accepts a draft or saved rule, uses the same AI check as live runs, and consumes one test from the workspace's allowance. It does not explicitly name when to prefer it over siblings like get_rule or simulate_flow, but the required inputs (rule + sample) make the intended use unambiguous.

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.