Skip to main content
Glama
dimitr-io
by dimitr-io

Wait for the simulation to end

cm_wait_end
Read-only

Wait for a CarMaker simulation to finish and return end status, simulation time, distance, results, and errors. If not finished, get live values and call again to continue waiting.

Instructions

Wait until the simulation is idle again. finished=true: end status, simulation time and distance, result_file, new log errors and pop-ups. finished=false: current state and live values; call again to keep waiting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
poll_sNoSeconds between status polls
timeout_sNoLongest time to wait in seconds; keep it below your client's tool time-out and call again if not finished

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
liveNo
noteNo
stateNo
popupsNo
testrunNo
finishedNo
waited_sNo
elapsed_sNo
logs_fileNo
distance_mNo
end_statusNo
log_errorsNo
logs_errorNo
sim_time_sNo
poll_errorsNo
result_fileNo
simulink_errorNo
stop_requestedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.2.1
    • addedOutput schema / properties / popups / items / properties / closed
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / popups / items / properties / details
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / popups / items / properties / program
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=false, so the safety profile is already covered. The description adds genuine context beyond that: it is a blocking wait that returns different payloads on completion vs. while still running (result_file, new log errors/pop-ups vs. live values), and tells the caller to re-invoke rather than expect a single blocking call to finish.

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?

Three compact clauses, no filler. The core wait semantics come first and the finished=true/false branching is presented in a scannable parallel structure.

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?

An output schema exists, so return values need not be fully restated, and annotations cover read-only safety. The description supplies the wait/loop behavior and the two result states. The main omission is routing among the several sibling wait/status tools, which matters in a family this large.

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

Parameters3/5

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

Schema description coverage is 100%, so poll_s and timeout_s are fully documented in the schema with defaults and the constraint that timeout must stay below the client's tool timeout. The description adds no syntax or tuning detail beyond that, so the baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource — waiting until the simulation is idle — and spells out the two terminal/continuation states via finished=true/false. It is clear what the tool does, though it never names a sibling (cm_status, cm_live, cm_study_wait, cm_standalone_wait_end) to distinguish itself from the other waiting/status tools in this large family.

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

Usage Guidelines3/5

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

"Call again to keep waiting" gives real guidance on the polling loop, which is the key usage pattern. However, there is no explicit when-to-use vs. cm_status/cm_live, nor vs. the study or standalone wait variants, so the agent must infer the context from the tool name alone.

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