Skip to main content
Glama

prepare_locomotive

Prepare a locomotive for a session by acquiring throttle, setting direction forward, and turning on all lights.

Instructions

Prepare ONE locomotive for a session: acquire, face forward, lights on.

Args: address: The locomotive's DCC address. prefix: Optional command station prefix (e.g. "O", "Z", "R"), passed straight through to acquire_throttle — including its DccSystem roster auto-detection when omitted.

Use for "prépare la loco"/"prepare the 3"/"get the autorail ready" — counterpart to park_locomotive, beginning a session rather than a normal "go" mid-run.

NOT stop/emergency_stop (speed only, active session) and NOT set_power (DCC station power, JMRI-wide). Only touches this locomotive's session state (throttle + lights), never power or speed/motion.

Three steps, one call: (1) acquire the throttle (safe if already held); (2) set direction forward (session-start convention, matching park_locomotive's end-of-session state); (3) turn on every light-related function, same as set_loco_lights(address, True).

Does NOT set a speed. Follow with set_speed/set_speed_ramped if the user also asked it to move.

Never call acquire_throttle, set_direction, and set_loco_lights yourself in sequence for a "prepare" request — use this tool.

Returns {"address", "acquired": bool, "direction": "forward", "lights": }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prefixNo
addressYes
Behavior5/5

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

With no annotations, the description fully discloses that it only touches the locomotive's session state (throttle + lights), does not set speed, and is safe even if throttle already held. It details the three steps and the outcome.

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 bullet points for arguments, clear separation of sections, and no wasted sentences. Slightly longer than necessary but still efficient; a minor trim could improve conciseness.

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

Completeness5/5

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

Covers all aspects: purpose, parameters, usage steps, what it does not do, and explicit return format. Given no output schema, the return description is complete and helpful for invocation.

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?

Despite 0% schema coverage, the description explains 'address' as DCC address and 'prefix' as optional command station prefix with examples, including its auto-detection behavior when omitted. This adds essential meaning beyond the raw 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?

Description clearly states the tool prepares one locomotive for a session with three steps: acquire, face forward, lights on. It contrasts with siblings like park_locomotive, stop, emergency_stop, and set_power, making its unique purpose distinct.

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 provides example usage phrases ('prépare la loco', 'prepare the 3'), warns against using stop/emergency_stop/set_power for this purpose, and advises against calling individual tools in sequence for a prepare request.

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