mujoco_get_state
Retrieve the current MuJoCo simulation state from a session without advancing physics, including positions, velocities, controls, sensors, body poses, and contacts as JSON.
Instructions
Read the current state of a session without advancing physics.
Returns JSON with the requested blocks: qpos/qvel/ctrl (vectors in model order),
sensors ({name: value}), bodies ({name: {pos, quat}} world-frame), contacts
({ncon, listed, contacts: [{geom1, geom2, pos, dist, normal_force}]}, capped at 20).
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": {
"session_id": "<session_id>"
},
"name": "mujoco_get_state"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include | No | State blocks to return, any of: qpos, qvel, ctrl, sensors, sensors_raw, bodies, contacts (default: qpos, qvel, ctrl, sensors) | |
| precision | No | Decimal places for returned floats | |
| session_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |