Skip to main content
Glama

get_version

Retrieve the current version of Home Assistant using a direct query tool, enabling AI assistants to access version details for system compatibility and integration purposes.

Instructions

Get the Home Assistant version

Returns: A string with the Home Assistant version (e.g., "2025.3.0")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler for the 'get_version' MCP tool. Registered with @mcp.tool() and logged via @async_handler. Delegates to the get_hass_version helper from app.hass module.
    @mcp.tool() @async_handler("get_version") async def get_version() -> str: """ Get the Home Assistant version Returns: A string with the Home Assistant version (e.g., "2025.3.0") """ logger.info("Getting Home Assistant version") return await get_hass_version()
  • Core helper function that performs the actual API call to retrieve Home Assistant version from /api/config endpoint, with error handling.
    @handle_api_errors async def get_hass_version() -> str: """Get the Home Assistant version from the API""" client = await get_client() response = await client.get(f"{HA_URL}/api/config", headers=get_ha_headers()) response.raise_for_status() data = response.json() return data.get("version", "unknown")
  • app/server.py:48-59 (registration)
    The @mcp.tool() decorator registers this function as the 'get_version' tool in the MCP server.
    @mcp.tool() @async_handler("get_version") async def get_version() -> str: """ Get the Home Assistant version Returns: A string with the Home Assistant version (e.g., "2025.3.0") """ logger.info("Getting Home Assistant version") return await get_hass_version()

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

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