Skip to main content
Glama
IBM

Physics MCP Server

by IBM

create_simulation

Initialize a new rigid-body physics simulation with configurable gravity, timestep, and dimensions using the Rapier engine.

Instructions

Create a new physics simulation using Rapier engine.

Initializes a new rigid-body physics world with configurable gravity and
timestep. Returns a simulation ID used for all subsequent operations.

Args:
    gravity_x: X component of gravity vector (m/s²). Default 0.0
    gravity_y: Y component of gravity vector (m/s²). Default -9.81 (Earth down)
    gravity_z: Z component of gravity vector (m/s²). Default 0.0
    dimensions: 2 or 3 for 2D/3D simulation. Default 3.
    dt: Simulation timestep in seconds. Default 0.016 (60 FPS).
        Smaller = more accurate but slower, larger = faster but less stable
    integrator: Integration method. Options: "euler", "verlet", "rk4". Default "verlet".

Returns:
    SimulationCreateResponse containing:
        - sim_id: Unique simulation identifier (use for all other sim calls)
        - config: Echo of the configuration used

Tips for LLMs:
    - Keep simulation IDs in memory for the conversation session
    - Default gravity is Earth standard (9.81 m/s² down = -Y direction)
    - dt=0.016 ≈ 60 FPS, dt=0.008 ≈ 120 FPS (higher accuracy)
    - "verlet" integrator is good default (stable, energy-conserving)
    - Remember to destroy_simulation when done to free resources

Requires:
    - Rapier provider must be configured (see config.py)
    - Rapier service must be running (see RAPIER_SERVICE.md)

Example:
    # Create simulation with Earth gravity
    sim = await create_simulation(
        gravity_y=-9.81,
        dt=0.016
    )
    # Use sim.sim_id for add_body, step_simulation, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gravity_xNo
gravity_yNo
gravity_zNo
dimensionsNo
dtNo
integratorNoverlet

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IBM/chuk-mcp-physics'

If you have feedback or need assistance with the MCP directory API, please join our Discord server