Skip to main content
Glama
adrighem

Domoticz MCP Server

by adrighem

get_sun_times

Retrieve sunrise, sunset, and twilight times for your home location to automate lighting and schedules.

Instructions

Get sun times (sunrise, sunset, twilight) based on home coordinates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the get_sun_times tool. Calls the Domoticz API endpoint 'getsunrisenset' to retrieve sunrise, sunset, and twilight times based on home coordinates.
    @mcp.tool()
    async def get_sun_times() -> str:
        """Get sun times (sunrise, sunset, twilight) based on home coordinates."""
        async with create_client() as client:
            response = await _do_request(client, "GET", f"{DOMOTICZ_API_URL}?type=command¶m=getsunrisenset")
            return response.text
  • The tool is registered via the @mcp.tool() decorator on the get_sun_times function. No separate registration file exists; the decorator on line 941 handles registration with the FastMCP instance.
    @mcp.tool()
    async def get_sun_times() -> str:
Behavior2/5

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

With no annotations, description must disclose behavioral traits. It mentions dependence on 'home coordinates' but does not clarify if these are configurable, how they are set, or what happens if they are missing. The read-only nature is implied but not explicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise single sentence with key information front-loaded. Could slightly expand on context (e.g., time of day for returned times) without becoming verbose.

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?

Description covers basic purpose but lacks details like whether times are for current date, timezone handling, or dependency on prior configuration. Output schema exists so return structure is handled separately.

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 baseline is 4 as per guidelines. Description adds no parameter information, but schema coverage is 100% by virtue of zero parameters.

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?

Description clearly states it gets sun times (sunrise, sunset, twilight) based on home coordinates. Verb and resource are specific, and it naturally distinguishes from other get_* sibling tools like get_all_devices or get_rooms.

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?

Implies usage for retrieving sun times, but no explicit guidance on when to use versus alternatives or when not to use. No mention of alternatives among siblings that might serve similar purposes.

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