get_block
Check if a model railroad block is occupied or unoccupied by entering its name or label, reading the current state from JMRI.
Instructions
Get the current OCCUPIED/UNOCCUPIED state of one layout block.
Args: name: Block name (JMRI system name like "IB1", or its user-friendly label) or an unambiguous fragment of the label. Case-insensitive.
Use this to answer "is block X occupied?" when the user names a layout block/section specifically (as opposed to a raw sensor id — if they instead name a sensor directly, use get_sensor). Read-only — there is no set_block tool, since a block reflects hardware JMRI detects via its linked sensor, 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_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |