Skip to main content
Glama
adrighem

Domoticz MCP Server

by adrighem

get_overview

Retrieve a high-level overview of your Domoticz home automation system. Choose between a minimal summary with counts or a standard overview including sample devices.

Instructions

Get a high-level overview of the Domoticz system.

Args: detail_level: 'minimal' (default) for counts and summary, 'standard' for including a sample of devices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detail_levelNominimal

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual handler function for the 'get_overview' tool. It is an async function decorated with @mcp.tool(), fetches system version info, and counts of devices, scenes, user variables, plans, and hardware. Supports 'minimal' and 'standard' detail levels.
    @mcp.tool()
    async def get_overview(detail_level: str = "minimal") -> str:
        """Get a high-level overview of the Domoticz system.
        
        Args:
            detail_level: 'minimal' (default) for counts and summary, 'standard' for including a sample of devices.
        """
        async with create_client() as client:
            # Get system info
            resp = await _do_request(client, "GET", f"{DOMOTICZ_API_URL}?type=command¶m=getversion")
            sys_info = resp.json()
            
            # Get counts from various caches
            devices = await _get_cached_data(client, _device_cache, f"{DOMOTICZ_API_URL}?type=command¶m=getdevices&filter=all&used=true")
            scenes = await _get_cached_data(client, _scene_cache, f"{DOMOTICZ_API_URL}?type=command¶m=getscenes")
            vars = await _get_cached_data(client, _user_variable_cache, f"{DOMOTICZ_API_URL}?type=command¶m=getuservariables")
            plans = await _get_cached_data(client, _plans_cache, f"{DOMOTICZ_API_URL}?type=command¶m=getplans&order=name&used=true")
            
            # Hardware count
            hw_resp = await _do_request(client, "GET", f"{DOMOTICZ_API_URL}?type=command¶m=gethardware")
            hardware = hw_resp.json().get("result", [])
            
            overview: Dict[str, Any] = {
                "system": {
                    "version": sys_info.get("version"),
                    "build_time": sys_info.get("build_time"),
                    "domoticz_url": DOMOTICZ_BASE_URL
                },
                "counts": {
                    "devices": len(devices),
                    "scenes_and_groups": len(scenes),
                    "user_variables": len(vars),
                    "rooms_plans": len(plans),
                    "hardware_gateways": len(hardware)
                }
            }
            
            if detail_level != "minimal":
                # Add a sample of favorite/active devices
                favorites = [d for d in devices if d.get("Favorite") == 1][:10]
                overview["favorite_devices"] = [_simplify_device(d) for d in favorites]
                
            return json.dumps({"status": "OK", "result": overview})
  • The tool is registered via the @mcp.tool() decorator on the get_overview function. FastMCP automatically registers it as a tool named 'get_overview'.
    @mcp.tool()
  • The input schema is defined by the function signature and docstring: detail_level parameter (string, defaults to 'minimal', accepts 'standard' for more detail). Output is a JSON string with status and result.
    @mcp.tool()
    async def get_overview(detail_level: str = "minimal") -> str:
        """Get a high-level overview of the Domoticz system.
        
        Args:
            detail_level: 'minimal' (default) for counts and summary, 'standard' for including a sample of devices.
        """
  • Helper function _format_response used to format the output as JSON string.
    def _format_response(data: Dict[str, Any]) -> str:
        """Format a dictionary as a JSON string response."""
        return json.dumps(data)
  • Helper function _simplify_device used to reduce device dictionaries to essential fields when detail_level is not 'minimal'.
    def _simplify_device(dev: Dict[str, Any]) -> Dict[str, Any]:
        """Reduce device dictionary to essential fields to save context space."""
        keys_to_keep = [
            "idx", "Name", "Type", "SubType", "Data", "Status", 
            "BatteryLevel", "Favorite", "HardwareName", "LastUpdate", 
            "TypeImg", "Usage", "CounterToday", "Temp", "Humidity"
        ]
        return {k: dev[k] for k in keys_to_keep if k in dev}
Behavior2/5

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

No annotations are provided, placing the full burden on the description. The description only explains the parameter behavior and implies a read operation ('get'), but fails to disclose any side effects, performance implications, or other behavioral traits. Beyond the parameter, no operational context (e.g., idempotency, authentication needs) is given.

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, using only two sentences: one for the overall purpose and one for the parameter explanation. It follows a clear docstring format with no redundancy, earning its place without any filler.

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?

Given that an output schema exists, the description does not need to detail return values. It adequately explains the input parameter and its impact on the output (counts/summary vs. sample). However, it could be more complete by noting that the output schema describes the exact structure, or by providing hints on which detail level to choose for different use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% parameter description coverage, so the description must compensate. It fully explains the single parameter 'detail_level', detailing its default value and the two valid options ('minimal' and 'standard') along with their effects (counts/summary vs. sample of devices). This adds all necessary semantic meaning.

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 tool retrieves a high-level overview of the Domoticz system, specifying the detail_level parameter with two concrete options ('minimal' and 'standard'). This verb+resource combination distinguishes it from sibling tools like get_system_status or get_all_devices.

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 explains the effect of the detail_level parameter but does not explicitly state when to use this tool versus alternatives or when not to use it. The usage is implied through the parameter options, but no explicit guidance on selection criteria or exclusions is provided.

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