Skip to main content
Glama

restart_ha

Restarts Home Assistant to apply changes or resolve issues. Temporarily disrupts all operations.

Instructions

Restart Home Assistant

⚠️ WARNING: Temporarily disrupts all Home Assistant operations

Returns: Result of restart operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The restart_ha MCP tool handler. Decorated with @mcp.tool() and @async_handler('restart_ha'), it calls restart_home_assistant() from app/hass.py to restart Home Assistant via the homeassistant.restart service.
    @mcp.tool()
    @async_handler("restart_ha")
    async def restart_ha() -> Dict[str, Any]:
        """
        Restart Home Assistant
        
        ⚠️ WARNING: Temporarily disrupts all Home Assistant operations
        
        Returns:
            Result of restart operation
        """
        logger.info("Restarting Home Assistant")
        return await restart_home_assistant()
  • The restart_home_assistant helper function that actually calls the Home Assistant API service 'homeassistant.restart' via call_service.
    @handle_api_errors
    async def restart_home_assistant() -> Dict[str, Any]:
        """Restart Home Assistant"""
        return await call_service("homeassistant", "restart", {})
  • app/server.py:929-929 (registration)
    Tool registration via @mcp.tool() decorator on the restart_ha function. Also imported in app/server.py from app.hass as restart_home_assistant.
    @mcp.tool()
  • The restart_ha function definition, returns Dict[str, Any] (JSON result of restart operation). No input parameters required.
    async def restart_ha() -> Dict[str, Any]:
        """
        Restart Home Assistant
        
        ⚠️ WARNING: Temporarily disrupts all Home Assistant operations
        
        Returns:
            Result of restart operation
        """
        logger.info("Restarting Home Assistant")
        return await restart_home_assistant()
Behavior4/5

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

The description explicitly warns that it 'Temporarily disrupts all Home Assistant operations,' providing critical behavioral insight. With no annotations, this disclosure is valuable, though it could mention authentication or reversibility.

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?

The description is extremely concise with only three lines, front-loading the purpose and warning. Every sentence adds value, making it efficient.

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?

Despite its brevity, the description covers the core purpose and the main behavioral warning. An output schema exists, so return details are likely covered there. Some might want more detail about the disruption nature, but overall it's adequate for a simple tool.

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?

No parameters exist, so the baseline score is 4. The description adds no parameter details, which is acceptable since none are needed.

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 clearly states 'Restart Home Assistant', specifying the exact verb and resource. It is distinct from siblings like get_version or get_error_log, which have different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. The description lacks context about prerequisites, expected outcomes, or situations where restart is appropriate.

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

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