Skip to main content
Glama
LamPyrid
by RadCod3

test_rule

Preview transactions a rule would affect before execution, returning matching transactions without modifying any data.

Instructions

Preview which transactions a rule would match WITHOUT applying changes.

Use this before executing a rule to see what would be affected. This is a read-only operation - no transactions are modified.

Returns the list of matching transactions that would be changed if the rule is executed.

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

Input Schema

NameRequiredDescriptionDefault
reqYesRequest model for testing a rule (preview matches).

Output Schema

NameRequiredDescriptionDefault
rule_idYesID of the rule that was tested
rule_titleYesTitle of the rule that was tested
matched_transactionsYesList of transactions that match the rule criteria. NOTE: These are the transactions that would be modified if the rule is executed, but they are shown here WITHOUT any modifications applied (preview mode).
matched_transaction_countYesNumber of transactions that would be affected by this rule

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral burden and does well: it declares the operation read-only, states that no transactions are modified, and describes the return value as the list of transactions that would change. It omits secondary traits such as permission requirements, rate limits, or whether the preview can be stale or truncated.

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?

The key constraint (no changes applied) is front-loaded in the first sentence, and each subsequent line reinforces usage or return behavior. There is mild redundancy between 'WITHOUT applying changes' and 'no transactions are modified,' which keeps it from a 5.

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 single nested request object fully documented in the schema and with an output schema present, the description covers what the agent needs: what it does, when to call it, that it is safe, and roughly what comes back. Nothing essential is missing.

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 description coverage is 100%, with rule_id, start_date, end_date, and account_ids all documented in the schema, so the baseline of 3 applies. The description adds no additional semantics about date inclusivity or the account_ids filter beyond what the schema already states.

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 opening line states a specific verb (preview/test) and resource (transactions matched by a rule) with an explicit scope qualifier: 'WITHOUT applying changes.' This cleanly distinguishes it from the execute_rule sibling, which presumably does apply changes.

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?

'Use this before executing a rule to see what would be affected' gives a clear when-to-use condition and implicitly points to executing a rule as the alternative action. It stops short of naming execute_rule directly or stating any when-not/exclusion cases, so it falls just short of the top mark.

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