Skip to main content
Glama
adrighem

Domoticz MCP Server

by adrighem

add_log_message

Add custom messages to the Domoticz system log with selectable severity levels: normal, status, or error.

Instructions

Add a custom message to the Domoticz system log. level: 1=normal, 2=status, 4=error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes
levelNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler for the add_log_message MCP tool. Registers via @mcp.tool() decorator. Takes a message string and optional level (1=normal, 2=status, 4=error), makes a GET request to Domoticz API's addlogmessage endpoint, and returns the response.
    @mcp.tool()
    async def add_log_message(message: str, level: int = 2) -> str:
        """Add a custom message to the Domoticz system log. level: 1=normal, 2=status, 4=error."""
        async with create_client() as client:
            response = await _do_request(client, "GET", f"{DOMOTICZ_API_URL}?type=command¶m=addlogmessage&message={urllib.parse.quote(message)}&level={level}")
            return response.text
  • Registration of add_log_message as an MCP tool via the @mcp.tool() decorator on the FastMCP instance 'mcp' (line 70).
    @mcp.tool()
  • Input schema/description for add_log_message: message (string, required) and level (int, default 2) with valid values 1=normal, 2=status, 4=error.
    """Add a custom message to the Domoticz system log. level: 1=normal, 2=status, 4=error."""
Behavior2/5

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

With no annotations, the description must disclose behavior. It mentions adding to the log and level values but does not cover side effects, authentication needs, or whether the tool is idempotent or rate-limited.

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 followed by a clear key-value mapping. Every word adds value, and the most critical information (action + level) is front-loaded.

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

Completeness2/5

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

Despite having an output schema, the description does not mention what the tool returns or error conditions. For a simple logging tool, this is a notable gap that could be filled with a brief note.

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?

Schema coverage is 0%, so the description must add parameter meaning. It explains the 'level' values (1=normal, 2=status, 4=error) but provides no additional context for the 'message' parameter beyond its name.

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 title and description clearly state the tool adds a custom message to the Domoticz system log. The level mapping is provided, and no sibling tools perform logging, making the purpose distinct.

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 what the tool does but does not explicitly state when to use it versus other tools. Since there are no sibling logging tools, usage is implied, but no guidance on prerequisites or exclusions.

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