Skip to main content
Glama
LoganInTX

hass-mcp-extensions

by LoganInTX

get_zigbee_events

Retrieve recent Zigbee action events for a device from the recorder database, with optional filtering by action type. More efficient than the logbook API.

Instructions

Fetch recent Zigbee action events for a device directly from the recorder DB.

Much more efficient than the logbook API — returns only the rows you need without loading the entire logbook into memory.

The action is stored in state_attributes.shared_attrs as event_type (e.g. down_double, up_single). This tool extracts it via JSON_UNQUOTE and returns one row per event.

Args: device_name: Friendly device name as it appears in Zigbee2MQTT, e.g. "Master Light Switch". Converted to the entity slug automatically (e.g. event.master_light_switch_action). minutes: How many minutes of history to return (default 60, max 10080). action: Optional filter, e.g. "down_double". If omitted, all actions are returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_nameYes
minutesNo
actionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, description fully discloses: extracts event_type from state_attributes.shared_attrs via JSON_UNQUOTE, returns one row per event, and auto-converts device name to entity slug. No contradictions.

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?

Well-structured with intro, comparison, tech detail, and Args section. Slightly long but every sentence adds value. Could be more concise, but not wasteful.

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 3 params, no annotations, and output schema present, description covers purpose, behavior, and all parameters adequately. Output schema covers return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage 0%, but description adds extensive meaning: explains device_name format and conversion, minutes default/max, action example and optionality. Far exceeds 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?

Describes specific action: fetch recent Zigbee action events for a device from recorder DB. Clearly distinguishes from siblings like get_logbook by stating efficiency and internal extraction method.

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?

Explicitly compares to logbook API, advising it's more efficient for this purpose. Provides guidance on action filter. Could mention when not to use, but overall clear.

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/LoganInTX/home-assistant-mcp'

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