Skip to main content
Glama
TheWhykiki

hass-mcp

by TheWhykiki

ha_list_services

List Home Assistant services and their fields to discover available actions for automations and scripts.

Instructions

List Home Assistant services and their fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool registration and handler for 'ha_list_services'. It uses an empty input schema, calls ha.listServices(), and returns the services JSON.
    server.tool(
      'ha_list_services',
      'List Home Assistant services and their fields.',
      ListServicesInput.shape,
      async () => {
        const services = await ha.listServices()
        return {
          content: [{ type: 'text', text: JSON.stringify(services, null, 2) }],
        }
      },
    )
  • The Zod schema for ha_list_services input — an empty strict object (no parameters accepted).
    export const ListServicesInput = z.object({}).strict()
  • src/index.ts:85-95 (registration)
    Registration of the tool named 'ha_list_services' on the MCP server via server.tool().
    server.tool(
      'ha_list_services',
      'List Home Assistant services and their fields.',
      ListServicesInput.shape,
      async () => {
        const services = await ha.listServices()
        return {
          content: [{ type: 'text', text: JSON.stringify(services, null, 2) }],
        }
      },
    )
  • The HomeAssistantClient.listServices() method that connects via WebSocket and delegates to the home-assistant-js-websocket getServices() function.
    async listServices() {
      const connection = await this.ensureConnected()
      return await getServices(connection)
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It offers minimal behavioral disclosure (only that it lists services), omitting details like authentication, rate limits, or non-destructiveness.

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?

The description is a single concise sentence with no wasted words. However, it is so brief that it may be under-specified for practical use.

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

Completeness2/5

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

Given the tools simplicity, the description lacks details about the return format or structure of 'fields', making it incomplete for an agent to fully understand the output.

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?

Tool has zero parameters, and schema description coverage is 100%. Baseline score of 4 applies because no parameter information is needed beyond 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?

The description uses a clear verb 'List' and specific resource 'Home Assistant services and their fields'. It distinguishes from sibling tools like ha_list_areas, ha_list_states, etc., by specifying 'services'.

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?

No explicit guidance on when to use this tool versus alternatives. Usage is implied (to discover available services), but no exclusions or context are provided.

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/TheWhykiki/hass-mcp'

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