Skip to main content
Glama

EMQX Broker Stats

emqx_broker_stats
Read-onlyIdempotent

Retrieve live cluster counters for online devices and subscriptions in one call, avoiding expensive client listing.

Instructions

Live counters for the whole cluster.

Answers "how many devices are online" and "how many subscriptions exist" in one call — cheaper than listing clients.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicsYesDistinct routed topics.
retainedNoRetained messages held by the broker.
sessionsYesSessions held, including offline ones.
connectionsYesCurrently connected MQTT clients.
subscriptionsYesActive subscriptions across the cluster.
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint false. The description adds valuable context: it covers the entire cluster, provides live counters, and notes a performance advantage (cheaper). This goes beyond the structured metadata without contradicting it.

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 sentences, extremely concise, and front-loaded with the core purpose ('Live counters for the whole cluster'). The second sentence reinforces the use case and cost benefit. There is no wasted wording.

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?

Given the tool's simplicity (0 parameters), rich annotations, and the presence of an output schema, the description is complete. It explains what the tool does, why it exists (cost benefit), and the cluster-wide scope. No critical information is missing for the agent to select and invoke it correctly.

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 tool has zero parameters, so schema coverage is 100% by default. The description does not need to explain parameters, and it doesn't. The baseline for 0-param tools is 4, and the description adds no parameter info but also has no missing parameter semantics.

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 clearly states the tool provides 'live counters for the whole cluster' with specific examples ('how many devices are online' and 'how many subscriptions exist'). It distinguishes itself from sibling tools like emqx_list_clients and emqx_list_subscriptions by highlighting its aggregate, cluster-wide nature and cost efficiency.

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?

It explicitly indicates when to use the tool: when you need cluster-level counts ('how many devices are online', 'how many subscriptions exist') and contrasts it with listing clients ('cheaper than listing clients'). It does not mention other alternatives like emqx_metrics_current or emqx_prometheus_stats, but the guidance is clear for the primary use case.

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