Skip to main content
Glama

Call any Home Assistant REST path

ha_call_api

Call any Home Assistant REST endpoint under /api when no dedicated tool exists. Supports GET, POST, and DELETE with optional JSON body.

Instructions

Call any REST endpoint under /api for cases without a dedicated tool, e.g. GET /api/components, GET /api/events, POST /api/config/core/check_config, GET /api/calendars/... . Args: method (GET|POST|DELETE), path (must start with /api and may include a query string), body (optional JSON). Prefer the dedicated tools when one exists; this one cannot bypass their guards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoJSON body for POST
pathYesPath starting with /api, e.g. "/api/components"
methodNoGET

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false, destructiveHint=false, so the safety profile is partially covered. The description adds genuine behavioral context beyond that: the /api path prefix requirement, allowed methods, and that dedicated-tool guards are still enforced. It stops short of noting auth/permission requirements or the oddity that DELETE is permitted under destructiveHint=false.

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-loads the purpose and examples, then packs method/path/body semantics and the guard caveat into two tight sentences. No filler; every clause carries an invocation-relevant constraint.

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?

For a generic escape-hatch endpoint with no output schema, the description covers purpose, scope, argument formats, and the preference ordering against dedicated tools. Return shape is omitted, which is defensible for arbitrary REST paths but leaves the agent guessing about response handling.

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 67% and the schema itself documents body and path but leaves method undocumented apart from its enum/default. The description compensates by listing the method values (GET|POST|DELETE), noting path may include a query string, and clarifying body is optional JSON for POST – real additions over the schema text.

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 ('call any REST endpoint under /api') and scopes it as a fallback for cases without a dedicated tool, with concrete example paths (GET /api/components, POST /api/config/core/check_config). An agent can tell instantly that this is the escape hatch rather than one of the many specific siblings like ha_get_config or ha_list_states.

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 tells the agent when to use it ('cases without a dedicated tool') and when not to ('Prefer the dedicated tools when one exists'), and adds a constraint that it 'cannot bypass their guards'. This is explicit when/when-not/alternative guidance rather than inference.

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