Skip to main content
Glama

Rebuild and relaunch the session

restart

Restart a running tModLoader session by stopping, rebuilding, and relaunching with the same settings, avoiding build errors from an open game.

Instructions

Stop, rebuild, and start again with the session's own settings.

Args: build: Compile the mod between stopping and starting. On by default, because picking up a code change is the reason this loop exists. timeout: Seconds to wait for readiness on the relaunch. build_timeout: Seconds to allow the compile.

THE ORDER IS THE POINT. tModLoader REFUSES to build while the game is open and reports it with an error that reads like a compile failure, so stop-then-build-then-launch is not a preference — building first sends you hunting a syntax error that is not there. Three separate calls let a caller get that order wrong; this one cannot.

The mode, port, player and WORLD come from the running session rather than from arguments or defaults. That last one is why Session had to start recording the world it resolved: a relaunch that fell back to the configured default would quietly load a different world than the one being tested, and report success.

Needs a running session, because a session is where those settings live. With nothing running there is nothing to reuse — call launch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buildNo
timeoutNo
build_timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
portYes
builtYes
worldYes
playerYes
killed_pidsYes
started_pidsYes
build_summaryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.3

TDQS

A5/5.0
Behavior5/5

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

The description discloses critical behavioral traits beyond the annotations: the order of operations matters because building while the game is open fails misleadingly; it uses session settings rather than arguments; it records the world to avoid loading a different one on relaunch. These details explain side effects and pitfalls, going well beyond the minimal readOnlyHint/destructiveHint flags.

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

Conciseness5/5

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

The description is well-structured: purpose first, then args, then the critical order explanation, then session settings, and finally prerequisites. Every sentence adds value, from the explicit ordering warning to the world-selection pitfall. It is detailed without being bloated, and the key points are front-loaded.

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?

This is a complex tool with build, stop, and relaunch phases plus session-specific settings. The description covers all necessary aspects: what it does, why order matters, what settings are reused, and the prerequisite of a running session. It also explains potential failure modes (false compile errors, wrong world loading). Given the complexity and the presence of an output schema, the description is fully complete.

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 schema description coverage at 0%, the description fully compensates by explaining each parameter: build ('Compile the mod between stopping and starting... On by default'), timeout ('Seconds to wait for readiness on the relaunch'), and build_timeout ('Seconds to allow the compile'). It also explains the default behavior and rationale, making the parameters self-documenting.

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 opens with a specific verb and resource: 'Stop, rebuild, and start again with the session's own settings.' It clearly distinguishes itself from siblings like launch and build_mod by explaining that it reuses the running session's configuration and enforces the correct order. The title 'Rebuild and relaunch the session' matches and adds specificity.

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?

It explicitly states when to use the tool ('Needs a running session') and when not to ('With nothing running there is nothing to reuse — call launch'). It also explains why the single call is preferable over three separate calls, providing clear context for choosing this over alternatives. The guidance is unambiguous and actionable.

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