Skip to main content
Glama

取消订阅 MQTT 主题

mqtt_unsubscribe

Unsubscribes from one or more MQTT topics on a named broker connection, letting you stop receiving messages from those topics.

Instructions

取消订阅指定的主题。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "connection": "<connection>",
      "topics": "<topics>"
    },
    "name": "mqtt_unsubscribe"
  }
}

Input Schema

NameRequiredDescriptionDefault
topicsYes要取消订阅的主题列表
connectionYes连接名称

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden, and it discloses almost nothing: it does not say whether unsubscribing a non-subscribed topic errors or is a no-op, whether the connection must already exist, or what the call returns. For a state-changing operation on a broker connection this is a meaningful gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler or redundancy. It is efficient, though the brevity reflects under-specification rather than disciplined compression.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (2 required params, no nested objects, no output schema), but with zero annotations and no return-value documentation, the description leaves the agent without prerequisite, failure-mode, or result information. The schema covers parameters; nothing covers behavior.

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% – both 'connection' (连接名称) and 'topics' (要取消订阅的主题列表) are documented in the schema itself. The description adds nothing beyond that, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('取消订阅指定的主题' – unsubscribe from the specified topics), which is unambiguous on its own and implicitly the inverse of mqtt_subscribe. It does not explicitly name or differentiate against any sibling, which keeps it out of 5 territory.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus mqtt_disconnect or mqtt_remove_connection, nor any prerequisite such as needing an active connection from mqtt_connect first. The agent must infer the entire usage context from the tool name.

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