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

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. Also the "Internal Debugger" dialog that the GUI or IPGMovie shows after an error of its own (type 'internal error', with the program and the call stack): it is read and then closed. 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_createA

Write a new project file, for example a tyre property file that differs from an existing one. Never overwrites; the file is logged and cm_revert_all moves it to the trash folder. To change a file that exists use cm_edit, to copy one cm_clone.

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. overruled_by in the answer: the model has a variable of that name in its own workspace and uses that one, so set it there.

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; wait with cm_study_wait. Nothing is written to project files. The answer names values that will change nothing: keys_not_found, workspace_not_found and workspace_overruled (the model has the variable in its own workspace: use scope=). IPGDriver corners only as fast as its limit Driver.Acc.ayMax allows (a test-run key): to compare variants on time, sweep it for each variant (keys {'Driver.Acc.ayMax': v}, steps of 0.5 around the current value) and compare each variant's fastest completed run.

cm_study_statusA

State of a study (running, done, cancelled, failed) and one row per finished run, which also maps every label to its result file. To wait for progress use cm_study_wait.

cm_study_waitA

Wait until another run of the study has finished or the study has ended, at most timeout_s, and return the compact table (new_rows says how many runs finished meanwhile). Call it again while state is 'running'. Use this for studies instead of cm_wait_end.

cm_study_cancelA

Stop the run in progress, skip the remaining ones and restore the changed workspace values. Only cancel a study this conversation started.

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 48 tools

Disambiguation4/5

Tools are grouped by clear domains (session, simulation, results, workspace/model, files, studies, standalone, changes) and descriptions explicitly cross-reference when to use which (e.g. cm_study_wait vs cm_wait_end). The main/standalone symmetry introduces some context-dependent overlap (cm_dva_write vs cm_standalone_dva_write, cm_status vs cm_standalone_status), but the prefix and detailed descriptions make selection tractable.

Naming Consistency5/5

All names use a consistent cm_ snake_case prefix and readable action/object phrasing. Minor variation between verb-only names (cm_list, cm_read) and noun/adjective names (cm_status, cm_live) does not break the overall pattern.

Tool Count2/5

48 tools is far above the recommended 3-15 range and includes parallel main/standalone families, making the surface heavy. Although the domain is complex, the set is too large to be comfortably scoped.

Completeness4/5

The server covers session setup, simulation lifecycle, results, movies, studies, standalone instances, project-file CRUD, workspace/model edits, and change reversal. A few minor operations (e.g. explicit deletion of arbitrary project/result files) are absent, but the lifecycle is otherwise thorough.

Maintenance

ActivityMaintained
ResponsivenessNo issues