Read a workspace variable
cm_get_workspace_varRetrieve the value of a MATLAB base or Simulink model workspace variable or object field by name, returning a description for objects instead of converting them.
Instructions
Value of a variable or field. MATLAB objects are described, not converted: read their fields.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "cm_get_workspace_var"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Variable or field, e.g. 'Kp_12' or 'Table.Value' | |
| scope | No | 'base' for the MATLAB base workspace, or the name of a loaded Simulink model for that model's workspace | base |