Skip to main content
Glama

Subscribe Client To Topic

emqx_client_subscribe
DestructiveIdempotent

Subscribe a client to a topic on its behalf, without the client's awareness. The subscription is not recreated after a clean-session reconnect, so use cautiously.

Instructions

[DESTRUCTIVE] Add a subscription to a client on its behalf.

The device does not know this happened and will not re-create the subscription after a clean-session reconnect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qosNoMQTT QoS: 0, 1 or 2.
topicYesTopic filter to subscribe, e.g. 'sensors/+/temp'.
clientidYesClient id to act for.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already mark destructiveHint=true and readOnlyHint=false. The description adds a key behavioral detail: the device is unaware of the subscription and it will not be recreated after a clean-session reconnect, which clarifies the side-effect nature beyond the annotation 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 consists of two concise sentences: the first states the operation, the second adds an important caveat. Every sentence earns its place with no 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?

The description, combined with the rich schema and annotations, covers the essential behavioral nuance (device unaware, clean-session behavior). Since an output schema exists, return values need not be explained, making the description sufficiently complete.

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?

All three parameters (clientid, topic, qos) have descriptions in the schema, giving 100% coverage. The description adds no additional parameter semantics beyond the action, so a baseline score of 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 clearly states 'Add a subscription to a client on its behalf,' which is a specific verb+resource. This distinguishes it from the sibling 'emqx_client_unsubscribe' which does the reverse action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives context about the behavior (device unaware, clean-session reconnect) but does not explicitly state when to use this tool versus alternatives like emqx_client_unsubscribe or emqx_publish. The usage guidance is implied rather than direct.

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