Skip to main content
Glama

set_light

Turn a model railroad layout light on or off and confirm its actual state. Specify the light by system name or label.

Instructions

Turn a layout light ON or OFF, and report the state actually observed.

Args: name: Light name (JMRI system name like "IL1", or its user-friendly label like "Depot Lighting") or an unambiguous fragment of the label. Case-insensitive. turn_on: True to turn the light ON, False to turn it OFF.

This is a layout light (scenery: depot, street, signal lamps, ...), distinct from a locomotive's F0 headlight function — if the user names a locomotive rather than a place/scene, use set_function or lights_on/lights_off on its DCC address instead. This writes to JMRI; the reported state is re-read after the command, and "confirmed" is honestly reported false if the observed state doesn't match what was requested (e.g. a feedback-wired light that didn't actually switch).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
turn_onYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations, but description details the write operation, re-reading state, and honest reporting of confirmation. Lacks mention of error handling or prerequisites, but still strong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear first sentence, args section, and behavioral notes. Slightly verbose but all content is valuable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no annotations or output schema, the description covers purpose, usage, parameters, and behavioral nuance. Could mention error scenarios, but overall sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema only provides names and types; description adds format, case-insensitivity, name matching via fragment, and explicit meaning of boolean values. Greatly enhances schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool turns layout lights ON/OFF and distinguishes from locomotive headlight functions, specifically mentioning sibling tools like set_function and lights_on/lights_off.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use (for layout lights) and when not to use (for locomotive lights), directing to alternatives. Also explains the write-and-re-read behavior.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HO44-PROJECT/MrJ-JMRI-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server