Skip to main content
Glama
adrighem

Domoticz MCP Server

by adrighem

restart_system

Trigger a system restart for Domoticz. Requires setting confirm to true to prevent accidental reboots.

Instructions

Restart the Domoticz system. Requires confirm=True.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual handler for the restart_system tool. It's an async function decorated with @mcp.tool(), requiring confirm=True to proceed. If confirmed, it calls the Domoticz API endpoint 'system_reboot' to restart the system.
    @mcp.tool()
    async def restart_system(confirm: bool = False) -> str:
        """Restart the Domoticz system. Requires confirm=True."""
        if not confirm:
            return '{"status": "error", "message": "You must set confirm=True to restart the system"}'
        async with create_client() as client:
            response = await _do_request(client, "GET", f"{DOMOTICZ_API_URL}?type=command¶m=system_reboot")
            return response.text
  • The @mcp.tool() decorator registers restart_system as an MCP tool on the FastMCP instance named 'Domoticz'.
    @mcp.tool()
  • Import of restart_system in the test file, showing it's exported from domoticz_mcp.server.
    from domoticz_mcp.server import call_domoticz_api, check_for_updates, restart_system, get_camera_snapshot
  • Test code for restart_system. Tests that confirm=False returns an error, and confirm=True successfully triggers the system_reboot API call.
    # restart_system
    respx.get(f"{DOMOTICZ_API_URL}?type=command¶m=system_reboot").mock(
        return_value=Response(200, json={"status": "OK"})
    )
    response_fail = await restart_system(confirm=False)
    assert "error" in json.loads(response_fail)["status"]
    
    response_ok = await restart_system(confirm=True)
    assert json.loads(response_ok)["status"] == "OK"
Behavior2/5

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

No annotations are provided, and the description only mentions a confirmation requirement without explaining the consequences (system downtime, service interruption).

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 a single, efficient sentence with no unnecessary words.

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

Completeness3/5

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

The description is minimal and does not cover return values or system impact, though an output schema exists. For a simple tool, it is adequate but not complete.

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?

The schema has no description for the confirm parameter, but the description adds the meaning that confirm must be true for the tool to work, which compensates for the lack of schema coverage.

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 the action (Restart) and resource (Domoticz system), which distinguishes it from all sibling tools.

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?

The description mentions the required confirm=True parameter, but does not provide guidance on when to use or not use the tool, nor any alternatives.

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/adrighem/domoticz-mcp'

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