Skip to main content
Glama

z2m_get_logs

Read-onlyIdempotent

Retrieve Zigbee2MQTT bridge logs and lifecycle events to diagnose pairing failures and rejoin loops. Filter by severity or text, or watch live for new lines.

Instructions

Read Zigbee2MQTT bridge logs and lifecycle events (device_joined, device_interview, device_leave, device_announce). Read-only. Returns buffered history by default; watch_seconds instead blocks for that many seconds collecting new lines. Logs are only captured while this server is connected, so history may be empty on a fresh start — use watch_seconds then. Use to diagnose pairing failures and rejoin loops; prefer z2m_health_report to find which devices are affected in the first place.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoMinimum severity. Note: Zigbee2MQTT never publishes debug lines to MQTT.
limitNoMaximum lines to return. Default 100.
containsNoOnly lines containing this substring (case-insensitive).
watch_secondsNoCollect new lines live for this many seconds instead of returning buffered history. Max 120.
include_eventsNoInclude bridge lifecycle events. Default true.
Behavior5/5

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

Beyond the annotations (readOnlyHint etc.), the description reveals that logs are only captured while the server is connected, meaning history may be empty on fresh start. It also explains the default buffered behavior and how watch_seconds changes collection mode. No contradiction with annotations.

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?

Three sentences, each serving a purpose: definition, behavior explanation, and usage guidance. It is front-loaded with the core action and efficiently packs essential context without 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 is complete for a read-only log tool: it explains behavior, edge cases (fresh start), and recommended use cases. Sibling tools and annotations provide additional context, and the absence of an output schema is acceptable here since the tool's return values are self-explanatory log lines.

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?

Schema coverage is 100%, so parameters are already well-documented. The description adds value by clarifying the default mode (buffered history) and the relationship between watch_seconds and the default behavior, enhancing understanding beyond the schema. It also hints at the level parameter's limitation (no debug lines) which is echoed in 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 clearly states the tool reads Zigbee2MQTT bridge logs and lifecycle events, listing specific event types. It distinguishes itself from siblings like z2m_health_report by focusing on log retrieval rather than device status. The verb 'Read' and resource 'bridge logs' are specific 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 Guidelines5/5

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

Explicitly says to use for diagnosing pairing failures and rejoin loops, and recommends an alternative (z2m_health_report) for finding affected devices. This provides clear when-to-use and when-not-to-use guidance, plus an alternative tool suggestion.

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/alexpfau/zigbee2mqtt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server