Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CM_HOMENoCarMaker install folder. Default: newest C:\IPG\carmaker\win64-*.
CM_MODELNoSimulink model to open when a session is started.
CM_ENABLENoOptional tools to switch on: tcl (raw Tcl in the CarMaker GUI), experimental (add and delete Simulink blocks).
CM_DISABLENoTool groups to switch off, to give the model a shorter tool list: standalone, study, matlab, movie.
CM_PROJECTNoCarMaker project folder. The server writes nowhere else. Needed to start a session from scratch. Default: read from the running CarMaker GUI.
CM_LOG_LEVELNoDetail of server.log. Default: INFO.
CM_STATE_DIRNoWhere backups, the change log and server.log are kept (never inside the project). Default: %LOCALAPPDATA%\carmaker-mcp.
CM_MATLAB_DIRNoFolder MATLAB starts in (where cmenv.m is). Default: <project>/src_cm4sl.
CM_MATLAB_EXENoMATLAB executable used to start a session. Default: newest installed MATLAB that your CarMaker supports.
CM_MATLAB_INITNoYour project's own MATLAB setup script (in src_cm4sl, or a full path), run once when a session is started. Use it if you normally run a script that adds folders to the path and opens the model: without it the model may not compile.
CM_RESULT_DIRSNoExtra folders to search for result files.
CM_POPUP_TIMEOUTNoSeconds after which CarMaker pop-ups answer themselves with their default choice, so that a question cannot block a run. Not set: they wait for your click.
CM_ENGINE_TIMEOUTNoSeconds before a call into MATLAB is given up. Default: 30.
CM_MATLAB_SESSIONNoName under which MATLAB shares its engine. Default: cm_mcp.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
cm_session_startA

Bring up a CarMaker for Simulink session as far as it is missing: start MATLAB (visible, in the project's src_cm4sl folder, engine shared), run cmenv, open the Simulink model and open the CarMaker GUI. Nothing is restarted or closed. Returns ready=true, or ready=false with what it is waiting for: call again until ready. Without a model it opens none and lists models_loaded and models_found to choose from. Many projects need their own setup script before the model compiles: if init_scripts_found lists one, pass it as init.

cm_doctorA

Check the setup: CarMaker install, Python version, MATLAB release and engine, shared MATLAB session, GUI, project folder. Each failed check comes with its fix.

cm_statusA

Simulation state, active Simulink model, project directory, last end status, the GUI's storage mode (save_mode) and gui_all_saved (false: the GUI holds unsaved data and will ask before a load; true is no guarantee, an edit in an open editor window is not counted).

cm_load_testrunA

Load a test run into the CarMaker GUI. Requires an idle simulation. Find names with cm_list('testrun').

cm_start_simA

Start the loaded test run. Returns once it is running; fails at once, with Simulink's error, if the model does not compile. Then call cm_wait_end until it reports finished.

cm_stop_simA

Stop the running simulation. With wait_s > 0 it returns what cm_wait_end returns.

cm_wait_endA

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.

cm_logA

Last lines of the newest CarMaker session log of the project. Use it when a run aborts or does not start.

cm_liveA

Current values of CarMaker quantities during a run (or the last values after it).

cm_dva_writeC

Overwrite a quantity during a run via Direct Variable Access.

cm_dva_releaseA

Release all quantities from DVA control.

cm_popupsA

Pop-up messages the CarMaker GUI raised for this server's commands (type info/warn/err/question, text, index of the answer given) and the current pop-up timeout. Reading empties the GUI's buffer (it keeps five). cm_load_testrun, cm_start_sim and cm_wait_end already return new ones as 'popups'.

cm_popup_timeoutA

Let GUI pop-ups raised by this server's commands answer themselves with their DEFAULT choice, so that a question such as 'Vehicle not saved. All changes will be lost. OK to continue?' cannot block a run. The default answer there discards the unsaved changes. Read what was answered with cm_popups. Stays until set back, cm_revert_all or a GUI restart.

cm_results_listB

Newest .erg result files under the project's SimOutput folder, CM_RESULT_DIRS and the folders this session's runs wrote to.

cm_results_summaryB

First / last / min / max / mean and unit of quantities in a result file, plus rows and duration.

cm_results_readB

Time series from a result file, decimated to at most max_points samples.

cm_output_quantitiesB

The quantities the next run writes to its result file, per storage rate (names may hold wildcards), with the sample times. movie_replay says whether such a result file can be replayed in IPGMovie. What a finished result file holds: cm_results_summary(erg, search='*').

cm_output_quantities_editA

Add quantities to, or remove them from, the project's output-quantities file (backed up first, logged, restored by cm_revert_all). Applies from the next start. Requires an idle simulation. Find names with cm_live (it reads any quantity) or in another result file.

cm_movie_openA

Open IPGMovie, CarMaker's 3D animation window (or take over one that is open). Open it BEFORE a run: it records a run only while it is open, and cm_movie_snapshot can then show any moment of it.

cm_movie_snapshotA

A picture of IPGMovie's 3D view, returned as an image. After a run it shows any moment of the last run (time_s), provided IPGMovie was open during that run. During a run, without time_s, it shows the IPGMovie window as it is at that moment (in the window's own size). With erg it replays a saved result file, which must hold the vehicle's motion (cm_output_quantities_edit(preset='movie') before that run). Do not pass time_s during a run: that makes IPGMovie stop following the run.

cm_listB

Names of project data files of one kind (test runs, vehicles, drivers, tyres...).

cm_readB

Key / value pairs of a CarMaker infofile. Large files are truncated: filter by keys or prefix.

cm_editA

Change keys in a project file in place (backed up first, logged; only the edited lines change). Requires an idle simulation; load the test run again afterwards.

cm_cloneA

Copy a project file to a new name in the same kind's folder. Never overwrites.

cm_list_workspace_varsA

Variables (name, class, size) of the MATLAB base workspace or of a Simulink model's workspace. Controller parameters usually live in the model workspace.

cm_get_workspace_varA

Value of a variable or field. MATLAB objects are described, not converted: read their fields.

cm_set_workspace_varA

Set a variable or field. The old value is logged and cm_revert_all restores it. Model-workspace changes live in memory until cm_model_save. Requires an idle simulation.

cm_model_getB

get_param on a loaded Simulink model or block.

cm_model_setA

set_param on a loaded Simulink model or block. Logged; cm_revert_all restores the old value.

cm_model_saveA

Save a loaded Simulink model. The file must be inside the project; it is backed up first.

cm_model_logs_saveA

After a CarMaker for Simulink run: write what Simulink logged (signals marked for logging and To Workspace blocks) to a MAT file, with the base workspace and the model workspace as one struct each (variables: signals, base_workspace, model_workspace, info). Requires an idle simulation. The result file (.erg) holds CarMaker's quantities; this holds the Simulink side.

cm_standalone_serversB

CarMaker simulation programs running on this machine (pid, description, whether this server manages it). A CarMaker Office window you opened shows up once its application is started.

cm_standalone_launchA

Start a NEW independent CarMaker simulation program (not connected to MATLAB) and run a test run on it. Only for test runs whose vehicle does not need a Simulink controller. Results go to the project's SimOutput; see cm_standalone_results.

cm_standalone_attachA

Attach to a CarMaker simulation program that is already running, for example one started from a CarMaker Office window.

cm_standalone_statusC

State of a standalone instance plus live values.

cm_standalone_controlC

Start, pause, resume or stop the simulation of a standalone instance.

cm_standalone_wait_endA

Wait until the instance's simulation has finished. finished=true: simulation time and distance, error flag and log errors. finished=false: call again to keep waiting.

cm_standalone_dva_writeB

Overwrite a quantity in a running standalone simulation (Direct Variable Access).

cm_standalone_resultsA

Result .erg files of the instance's run (read them with cm_results_summary / cm_results_read).

cm_standalone_closeA

Disconnect; for instances this server launched, also stop the CarMaker process.

cm_study_startA

Run one test run several times with different parameter values, one after another, in the background. Returns a study id at once; poll cm_study_status. Nothing is written to project files.

cm_study_statusB

State of a study (running, done, cancelled, failed), the run in progress and one row per finished run: end status, simulation time, distance, result file, statistics of the requested quantities.

cm_study_cancelA

Stop the run in progress, skip the remaining ones and restore the changed workspace values.

cm_changelogB

Recorded changes (file keys, workspace variables, model parameters, GUI settings) with old and new values.

cm_revert_allA

Undo every change made in this server session: workspace values and model parameters in reverse order, backed-up files put back (created files go to a trash folder), GUI settings restored.

cm_restoreB

Restore project files from the backups of an earlier session. Files only.

Prompts

Interactive templates invoked by user choice

NameDescription
run_and_summariseRun a test run and summarise the result
compare_settingsRun a test run with two values of one parameter and compare the results
undo_sessionShow what this session changed and undo it

Resources

Contextual data attached and managed by the client

NameDescription
guideHow to use this server: workflows, parameters, troubleshooting
statusCurrent simulation status (same as cm_status)
changelogChanges made by this server session (same as cm_changelog)
logLast 200 lines of the newest CarMaker session log

TDQS

B3.4/5.0

Scored across 46 tools

Disambiguation4/5

Most tools target distinct resources and actions, and the descriptions are unusually detailed, which helps separate e.g. cm_live from cm_results_read or cm_model_get from cm_get_workspace_var. However, the parallel main-session and standalone-session families, plus several read/get-style tools across different data sources, can still require careful description reading to avoid misselection.

Naming Consistency4/5

Almost all names use a consistent cm_ prefix and snake_case, with clear resource-oriented prefixes such as cm_model_, cm_results_, cm_standalone_, and cm_study_. There is minor inconsistency in verb ordering (e.g. cm_model_get vs cm_get_workspace_var), but the pattern remains highly readable.

Tool Count2/5

46 tools is far above the typical well-scoped range and exceeds the 25+ threshold for a heavy surface. Although CarMaker is a broad domain, many tools could likely be consolidated or grouped, especially the parallel main and standalone lifecycle families.

Completeness4/5

The surface covers simulation lifecycle, project file CRUD via list/read/edit/clone, workspace variables, model parameters, results, studies, standalone instances, logs, GUI popups, and movie snapshots. Minor gaps remain, such as no explicit project-file delete/cleanup operation and limited direct GUI-setting management beyond popup timeout.

Maintenance

ActivityMaintained
ResponsivenessNo issues