Skip to main content
Glama
LoganInTX

hass-mcp-extensions

by LoganInTX

get_logbook

Fetch logbook entries for a Home Assistant entity by querying the recorder database directly via SSH, avoiding large API payloads. Returns action names for events or state for other entities.

Instructions

Fetch logbook entries for an entity, including full event attributes.

Queries the recorder MariaDB directly via SSH rather than the logbook HTTP API, avoiding the massive response payloads the API endpoint returns.

For event.*_action entities the action name is extracted from state_attributes.shared_attrs and returned as action. For all other entities state is returned as-is.

Args: entity_id: Entity to query (e.g. "event.master_light_switch_action"). hours: How many hours of history to fetch (default 24, max 168).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYes
hoursNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses the direct SSH-to-MariaDB method and specifies different behavior for event.*_action vs other entities. 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?

Description is well-structured with main action, implementation detail, behavior specifics, and parameter list. It is not overly terse but efficient for the information provided.

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

Completeness4/5

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

Given the presence of an output schema and the description covering behavior, parameter details, and use case differentiation, it is reasonably complete for a data-fetching tool among 26 siblings.

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?

Both parameters are described with examples and constraints (entity_id example, hours default/max) that add value beyond the bare schema which has 0% description coverage.

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 clearly states the tool fetches logbook entries for an entity with full event attributes. It differentiates by mentioning the direct DB query vs the HTTP API, but does not explicitly contrast with siblings like get_history.

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 explicitly explains why to use this tool (avoids large payloads of the HTTP API) and provides context for its use. However, it does not list alternatives or when not to use it.

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