get_sensor
Check a sensor's current state to answer questions like 'is this block occupied?' Returns ACTIVE or INACTIVE from JMRI hardware.
Instructions
Get the current ACTIVE/INACTIVE state of one sensor.
Args: name: Sensor name (JMRI system name like "RS22", or its user-friendly label like "Montagne B") or an unambiguous fragment of the label. Case-insensitive.
Use this to answer "is block X occupied?" or similar real-world state questions ("is the clock running?" for the ISCLOCKRUNNING sensor JMRI always has). Read-only — there is no set_sensor tool, since a sensor reflects hardware JMRI detects, not a command this project should issue. No side effects.
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": {
"name": "<name>"
},
"name": "get_sensor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |