Skip to main content
Glama
adrighem

Domoticz MCP Server

by adrighem

set_security_status

Set the security panel to disarm (0), arm home (1), or arm away (2) using your security code.

Instructions

Set the security panel status. secstatus: 0=Disarm, 1=Arm Home, 2=Arm Away.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
secstatusYes
seccodeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `set_security_status` tool handler function. It is a `@mcp.tool()` decorated async function that accepts `secstatus` (int: 0=Disarm, 1=Arm Home, 2=Arm Away) and `seccode` (str) parameters. It calls the Domoticz API endpoint `setsecstatus` with the provided security status and code, and returns the response.
    @mcp.tool()
    async def set_security_status(secstatus: int, seccode: str) -> str:
        """Set the security panel status. secstatus: 0=Disarm, 1=Arm Home, 2=Arm Away."""
        async with create_client() as client:
            response = await _do_request(client, "GET", f"{DOMOTICZ_API_URL}?type=command¶m=setsecstatus&secstatus={secstatus}&seccode={urllib.parse.quote(seccode)}")
            return response.text
  • The tool is registered via the `@mcp.tool()` decorator on line 1055, which is the standard FastMCP tool registration mechanism. The function name `set_security_status` becomes the tool name exposed to the MCP client.
    @mcp.tool()
  • The input schema is defined in the function signature: `secstatus: int` (0=Disarm, 1=Arm Home, 2=Arm Away) and `seccode: str` (the security code). The docstring describes the valid secstatus values.
    async def set_security_status(secstatus: int, seccode: str) -> str:
        """Set the security panel status. secstatus: 0=Disarm, 1=Arm Home, 2=Arm Away."""
        async with create_client() as client:
  • The `get_security_resource` resource handler (domoticz://security) is a related helper that reads the current security status via the `getsecstatus` API endpoint.
    @mcp.resource("domoticz://security")
    async def get_security_resource() -> str:
        """Read the current status of the security panel."""
        async with create_client() as client:
            response = await _do_request(client, "GET", f"{DOMOTICZ_API_URL}?type=command¶m=getsecstatus")
            return response.text
  • The `get_security_status` tool is a companion read-only tool that retrieves the current security panel status by calling `getsecstatus`.
    @mcp.tool()
    async def get_security_status() -> str:
        """Get the current status of the security panel."""
        async with create_client() as client:
            response = await _do_request(client, "GET", f"{DOMOTICZ_API_URL}?type=command¶m=getsecstatus")
            return response.text
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool sets status but does not disclose behavioral traits such as authentication requirements, confirmation steps, or side effects (e.g., alarms triggered). This is minimal disclosure for a write operation.

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 consists of two concise sentences with no fluff. Every word adds value, and the parameter mapping is clear and front-loaded.

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?

Given 2 parameters, no annotations, and an existing output schema, the description explains secstatus but omits seccode. It provides enough for basic use but lacks completeness on input requirements and behavioral context.

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

Parameters3/5

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

The description adds meaning for secstatus by mapping values to states, but does not explain the seccode parameter (likely a security code). With 0% schema coverage, the description partially compensates but leaves a gap for one parameter.

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 ('Set') and the resource ('security panel status'), and explains the meaning of the secstatus parameter values (0=Disarm, 1=Arm Home, 2=Arm Away). This distinguishes it from sibling tools like 'get_security_status'.

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 provides parameter details but does not explicitly state when to use this tool versus alternatives like 'get_security_status'. Usage is implied by the verb 'set', but no exclusion scenarios or prerequisites are mentioned.

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