Skip to main content
Glama

set_speed_ramped

Ramp a DCC locomotive's speed up or down to a target percentage, with optional direction flip and automatic stop after a hold time.

Instructions

Change a locomotive's speed gradually — a smooth ramp up and/or down.

Args: address: DCC address. Auto-acquires the throttle if needed. speed_percent: Target speed, 0-100%. Legacy shorthand: NEGATIVE toggles direction relative to current facing, ramps to |value|%. Prefer explicit direction for new calls — ignored as a sign once direction is given (only its clamped 0-100 magnitude used then). direction: Optional "forward"/"reverse" (case-insensitive), set atomically with speed_percent, e.g. "avance progressivement à 40%" (loco in reverse) -> speed_percent=40, direction="forward", rampup_seconds=3. Wins over the negative-sign shorthand if both given. rampup_seconds: Seconds to climb to the target if higher (or on a direction flip while moving). 0 = instant. rampdown_seconds: Seconds to descend when lower, on a direction-flip stop-first, and for hold_seconds' auto-stop. 0 = instant. hold_seconds: Hold the target this long, then auto-ramp to a stop before returning — "run forward at 30% for 10s" -> hold_seconds=10. Omit to reach the target and keep going.

Use instead of plain set_speed for "en douceur"/"progressivement" or a duration before stopping. Use emergency_stop for a panic stop — never sent here, even at rampdown_seconds=0.

A SHORT total duration blocks and returns final speed/direction. A LONGER one returns immediately with "status": "started" and keeps running server-side — the loco stops itself automatically, no follow-up call needed. "started" is success, not "finished".

A direction flip while moving ramps to 0 first, flips, then ramps back up.

speed_percent is relative to THIS loco's configured maximum (roster "Throttle Speed Limit") like set_speed.

Returns final speed/direction, or for the background path: {"address", "status": "started", "speed_percent", "direction", "seconds_total"}. Either shape includes "system" (full command-station name) only when non-default.

In exhibition mode, speed_percent/direction are IGNORED and replaced with a fixed, moderate, forward-only speed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes
directionNo
hold_secondsNo
speed_percentYes
rampup_secondsNo
rampdown_secondsNo
Behavior4/5

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

Discloses key behavioral traits: direction flip ramps to 0 first, auto-stop for hold_seconds, short vs long duration behavior, exhibition mode override, speed_percent relative to loco's max. No annotations provided, so description carries full burden. Still thorough, though missing error handling or prerequisites.

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 sections for each parameter and behavior. Front-loaded purpose. Somewhat verbose but necessary for the complex behavior. Efficient use of sentences.

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?

Given no output schema, the description explains return values for both short and long duration paths. Covers exhibition mode, auto-acquire throttle, and all parameter interactions. Complete for a tool with 6 parameters and complex behavior.

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?

With 0% schema description coverage, the description compensates fully. It explains the negative sign shorthand for speed_percent, interaction between direction and negative sign, rampup/rampdown_seconds behavior in various scenarios, and hold_seconds auto-stop. Adds significant meaning beyond the 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?

The description clearly states 'Change a locomotive's speed gradually — a smooth ramp up and/or down.' It specifies the verb (change), resource (locomotive speed), and distinguishes from siblings like set_speed and emergency_stop.

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 this tool over alternatives: 'Use instead of plain set_speed for "en douceur"/"progressivement" or a duration before stopping. Use emergency_stop for a panic stop — never sent here, even at rampdown_seconds=0.' Clear context and exclusions.

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