Skip to main content
Glama
diverdown1964

Home Assistant MCP Server

list_services

Discover all available services in your Home Assistant smart home system to control devices like lights, switches, and sensors.

Instructions

List all available Home Assistant services

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'list_services' tool. It calls haClient.getServices() to fetch the services from Home Assistant API and returns the result as a JSON-formatted text content block.
    case "list_services": { const services = await haClient.getServices(); return { content: [ { type: "text", text: JSON.stringify(services, null, 2), }, ], }; }
  • src/index.ts:153-160 (registration)
    Registration of the 'list_services' tool in the ListTools response, including name, description, and empty input schema (no parameters required).
    { name: "list_services", description: "List all available Home Assistant services", inputSchema: { type: "object", properties: {}, }, },
  • Helper method in HomeAssistantClient class that fetches the list of available services from the Home Assistant API endpoint '/api/services'.
    async getServices() { return this.fetch("services"); }
  • Input schema for the 'list_services' tool, which requires no parameters (empty properties).
    inputSchema: { type: "object", properties: {}, },

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/diverdown1964/HomeAssistant-MCP'

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