get_event
Retrieve the source code and details of any Domoticz event script by providing its event ID.
Instructions
Get the source code and details of a specific event script by ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/domoticz_mcp/server.py:823-827 (handler)The main handler function for the 'get_event' tool. It takes an event_id parameter, calls the Domoticz API to load the event script, and returns its source code/details.
async def get_event(event_id: int) -> str: """Get the source code and details of a specific event script by ID.""" async with create_client() as client: response = await _do_request(client, "GET", f"{DOMOTICZ_API_URL}?type=command¶m=events&evparam=load&event={event_id}") return response.text - src/domoticz_mcp/server.py:822-822 (registration)The 'get_event' function is registered as an MCP tool via the @mcp.tool() decorator.
@mcp.tool() - src/domoticz_mcp/server.py:823-823 (schema)The schema/parameter definition for the 'get_event' tool: requires a single integer parameter 'event_id' and returns a string.
async def get_event(event_id: int) -> str: