Skip to main content
Glama

get_version

Retrieve the current Home Assistant version number to verify system compatibility and check for available updates.

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 function for the 'get_version' tool. Registered via @mcp.tool() decorator. Logs execution and delegates to the get_hass_version helper function.
    @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()
  • Helper function that implements the core logic: fetches Home Assistant configuration via API and extracts the version string.
    @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")

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