Skip to main content
Glama

Test EMQX Rule SQL

emqx_test_rule_sql
Read-onlyIdempotent

Validate EMQX rule SQL by dry-running it against a sample event to see if it matches and what columns it emits, without saving anything.

Instructions

Dry-run rule SQL against a sample event. Nothing is saved.

Use this to check a rule before creating it — it reports whether the event would match and what columns the rule would emit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesRule SQL to evaluate, e.g. "SELECT payload FROM 'sensors/#'".
topicNoTopic of the sample event.t/1
payloadNoPayload of the sample event.{}

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already declare readOnlyHint and destructiveHint, but the description adds the concrete statement 'Nothing is saved' and details the report contents ('whether the event would match and what columns the rule would emit'). This provides useful behavioral context beyond the safety flags.

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 two short sentences, front-loaded with the core action and non-save guarantee, followed by practical usage. Every word earns its place without redundancy.

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 simple dry-run tool with full schema coverage and an output schema present, the description covers purpose, safety, usage, and result behavior. It is complete and leaves no critical questions unanswered.

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%, so the three parameters (sql, topic, payload) are already well-documented. The description adds no additional parameter-specific semantics beyond calling it a 'sample event', so baseline 3 is appropriate.

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 starts with a specific verb+resource 'Dry-run rule SQL' and clarifies scope ('against a sample event'), making it clear what the tool does. It also distinguishes itself from siblings like emqx_list_rules or emqx_publish by focusing on pre-creation validation.

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?

Explicitly says 'Use this to check a rule before creating it', providing a clear when-to-use context. It doesn't mention when-not-to-use or name alternatives, but the guidance is unambiguous and sufficient for this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/WOOWTECH/Woow_emqx_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server