call_service_tool
Invoke any Home Assistant service by providing domain, service, and optional data to control devices and automations.
Instructions
Call any Home Assistant service (low-level API access)
Args: domain: The domain of the service (e.g., 'light', 'switch', 'automation') service: The service to call (e.g., 'turn_on', 'turn_off', 'toggle') data: Optional data to pass to the service (e.g., {'entity_id': 'light.living_room'})
Returns: A dictionary with success status, the domain/service called, and the list of affected entity states returned by Home Assistant.
Examples: domain='light', service='turn_on', data={'entity_id': 'light.x', 'brightness': 255} domain='automation', service='reload' domain='fan', service='set_percentage', data={'entity_id': 'fan.x', 'percentage': 50}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"domain": "<domain>",
"service": "<service>"
},
"name": "call_service_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| domain | Yes | ||
| service | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |