Skip to main content
Glama
Home Assistant MCP Server

Home Assistant MCP Server

by rilhia

Get logbook

get_logbook
Read-onlyIdempotent

Retrieve Home Assistant logbook entries from the last N hours, optionally filtered to one entity, to see what happened and why. Use limits to keep the newest records.

Instructions

Logbook entries (what happened and why) over the last N hours, optionally for a single entity.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_logbook"
  }
}

Input Schema

NameRequiredDescriptionDefault
hoursNoHow far back to look.
limitNoMaximum entries, newest kept.
entity_idNoRestrict to one entity.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered by structured data. The description adds little beyond that - no mention of ordering, pagination behavior, or truncation when limit is hit, even though 'newest kept' lives only in the schema.

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 tightly written sentence with the resource front-loaded and the entity restriction last; no filler. It loses a point only because 'over the last N hours' duplicates what the hours parameter description already says.

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

Completeness3/5

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

With a fully documented 3-parameter schema and complete annotations, the basics are covered, and no output schema means return shape need not be explained. What is missing is the differentiator against the many other log/history tools in the sibling set, which matters for correct tool selection.

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% with three well-documented parameters (hours, limit, entity_id), so the baseline is a 3. The description merely restates the hours window and the optional entity restriction without adding format, defaults, or semantics beyond the schema.

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?

States a specific resource (logbook entries) with a clarifying gloss ('what happened and why') and a time scope, which tells an agent it is a narrative/annotated event feed rather than raw state data. It does not, however, distinguish itself from close siblings like get_history, get_audit_log, or get_system_log, leaving the agent to infer the boundary.

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

Usage Guidelines3/5

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

Usage is only implied: 'what happened and why' hints at narrative context lookup, and 'optionally for a single entity' hints at scoped queries, but there is no explicit statement of when to choose this over get_history or get_audit_log, and no exclusions or prerequisites.

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