get_block
Retrieve the occupancy state (OCCUPIED or UNOCCUPIED) of a model railroad block by its name or label.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |