Skip to main content
Glama
homeassistant-ai

Home Assistant MCP Server

Official

Get Category

ha_config_get_category
Read-onlyIdempotent

List Home Assistant categories for a scope or retrieve a specific category by ID to organize automations, scripts, scenes, and helpers.

Instructions

Get category info - list all categories for a scope or get a specific one by ID.

Without a category_id: Lists all Home Assistant categories for the given scope. With a category_id: Returns configuration for that specific category.

Categories are domain-scoped organizational groups for automations, scripts, scenes, and helpers.

EXAMPLES:

  • List helper categories: ha_config_get_category("helpers")

  • Get specific category: ha_config_get_category("automation", category_id="my_category_id")

Use ha_config_set_category() to create or update categories. Use ha_set_entity(categories={"automation": "category_id"}) to assign categories to entities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeYesDomain scope for categories (e.g., 'automation', 'script', 'scene', 'helpers').
category_idNoID of the category to retrieve.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv8.6.0
    • changedInput schema / properties / category_id / description
      Previous value: -"ID of the category to retrieve. If omitted, lists all categories for the scope."New value: +"ID of the category to retrieve."
  2. First observedv7.14.2

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds the meaningful behavioral nuance that omitting category_id changes the operation into a list, plus the domain-scoping concept. It does not mention auth/rate limits, but nothing is contradicted.

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?

Front-loaded with the core action, then branches, then context, then examples and alternatives. Every sentence earns its place; no filler.

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?

An output schema exists, so return values need no prose. For a two-parameter, optionally-branching read tool, the description plus annotations plus examples cover everything an agent needs to select and invoke it correctly.

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 baseline is 3, but the description genuinely adds semantics: it spells out the dual effect of optional category_id, gives concrete scope values, and supplies two worked examples. This goes beyond restating 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?

States a specific verb and resource ('Get category info') and immediately clarifies the dual mode: list all categories for a scope, or fetch one by ID. The domain-scope sentence ('domain-scoped organizational groups for automations, scripts, scenes, and helpers') further anchors what a category is, distinguishing it from siblings like ha_config_get_label or ha_config_list_groups.

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 routes the agent: use ha_config_set_category() to create/update and ha_set_entity(categories=...) to assign. The without/with category_id branches define exactly when each behavior triggers, leaving no inference required.

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

Deploy Server

Other Tools