Skip to main content
Glama

Get Retained Message

emqx_get_retained
Read-onlyIdempotent

Fetch the retained message stored for an MQTT topic, returning found=false when no value exists.

Instructions

Read the retained message stored for one topic.

Returns found=false when the topic has nothing retained — that is an ordinary answer, not an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesExact topic whose retained message to read, e.g. 'woow/test/switch/state'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
qosNoQoS the message was published at.
foundYesFalse when nothing is retained there.
topicYesTopic the message is retained on.
lookupNoHow it was located: 'direct' or 'listing'. Hierarchical topics cannot be addressed directly by EMQX's REST API.
payloadNoDecoded payload text.
publish_atNoWhen it was published.
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the bar is lower. The description adds valuable behavior that found=false is an ordinary answer, not an error, which is not visible in the annotations. This helps prevent misinterpretation of the most likely edge case.

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: the first states the action and resource immediately, and the second adds the most important behavioral nuance. Every word earns its place with no repetition or fluff.

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 single-topic read tool with one parameter, comprehensive annotations, and an output schema, the description is complete. The found=false clarification addresses the only likely confusion, making the tool actionable without further documentation.

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?

The input schema description covers the 'topic' parameter fully (with an example), and the tool description does not add additional meaning beyond restating 'one topic.' With 100% schema coverage, 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 uses the specific verb 'Read' and identifies the resource as 'the retained message stored for one topic,' which clearly distinguishes it from sibling tools like emqx_list_retained (listing all retained messages) or emqx_delete_retained (deleting). The scope is explicit and unambiguous.

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?

The description provides clear context: it is for reading a single topic's retained message, which implies it should be used when you need one specific value rather than a list. However, it does not explicitly name alternative tools or state when not to use it, missing the full 'when/alternatives' guidance.

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