set_all_locos_lights
Turn on or off every light-related function of all currently-acquired locomotives in one call. Bulk lighting control for multiple trains without naming each one.
Instructions
Turn ON/OFF EVERY light-related function of EVERY currently-acquired locomotive at once.
Args: state: True to turn every light-related function on for every locomotive, False to turn them all off.
Call for "turn on/off all the lights of all the locos"/"allume/ éteins toutes les lumières de toutes les locos" — locomotives in bulk, no single one named. Never loop set_loco_lights/set_function yourself — this loops server-side in one call, over every locomotive this session has acquired.
Same scope limitation as emergency_stop_all: only reaches locomotives THIS session has acquired a throttle for. A locomotive driven only from a JMRI panel or another session is untouched. Nothing acquired yet returns {"locomotives": []}, not an error.
For ONE named locomotive use set_loco_lights. For layout/scenery lighting (JMRI Light objects, no locomotive involved), use set_layout_lights instead — never this tool.
Returns {"locomotives": []} — attempted independently, one failure doesn't block the others.
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": {
"state": "<state>"
},
"name": "set_all_locos_lights"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes |