Skip to main content
Glama

Create EMQX Trace

emqx_create_trace

Start capturing MQTT packets for a client, topic, or IP to diagnose why connected devices send no data. Specify the target to trace and let it run to completion.

Instructions

Start capturing MQTT packets for one client, topic or IP.

Traces are the tool for "the device connects but nothing arrives". Note the capture buffers in memory and only flushes to disk when it expires — let it run to completion before reading the log, and do not delete it early or the buffered events are lost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesUnique trace name; you will reuse it to read the log.
targetYesThe client id, topic filter or IP to capture.
target_typeYesWhat to trace on.
duration_secondsNoHow long to capture for.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description goes beyond annotations by revealing that traces buffer in memory and only flush to disk upon expiry, and that deleting early loses buffered events. This is critical operational knowledge that annotations do not convey.

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 only three sentences, with the purpose stated first and the crucial buffering warning in a compact paragraph. No fluff or repetition of schema fields.

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 schema fully documents parameters and an output schema exists, the description covers the essential operational caveat (memory buffering, data loss risk) and a clear usage scenario. This is sufficient for an agent to invoke the tool correctly.

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 four parameters are fully documented in the schema (100% coverage), so the description doesn't need to add parameter details. It does reference the target types ('client, topic or IP') which aligns with target_type, but adds nothing beyond the schema.

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 opens with a specific verb phrase 'Start capturing MQTT packets' and scopes it to 'one client, topic or IP', clearly differentiating it from sibling trace tools like emqx_get_trace_log and emqx_delete_trace. It also adds a typical debugging scenario.

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 provides a concrete use case: 'the device connects but nothing arrives', signaling when to initiate a trace. It also warns against deleting early, guiding the agent to wait for expiry, though it does not explicitly name the companion tools for reading or deleting traces.

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