Skip to main content
Glama
IBM

Physics MCP Server

by IBM

add_rigid_body

Add a rigid body to an existing physics simulation, enabling collisions and interactions. Supports static, dynamic, and kinematic types with customizable shapes and physics properties.

Instructions

Add a rigid body to an existing simulation.

Creates a new physics body (static, dynamic, or kinematic) with specified
shape, mass, and initial conditions. Bodies interact via collisions.

Args:
    sim_id: Simulation ID from create_simulation
    body_id: Unique identifier for this body (user-defined string)
    body_type: "static", "dynamic", or "kinematic"
        - static: Never moves (ground, walls)
        - dynamic: Affected by forces and collisions
        - kinematic: Moves but not affected by forces (scripted motion)
    shape: Collider shape: "box", "sphere", "capsule", "cylinder", "plane"
    size: Shape dimensions:
        - box: [width, height, depth]
        - sphere: [radius]
        - capsule: [half_height, radius]
        - cylinder: [half_height, radius]
        - plane: not needed (use normal/offset instead)
    mass: Mass in kilograms (for dynamic bodies). Default 1.0
    normal: Normal vector [x, y, z] for plane shape. Default [0, 1, 0] (upward)
    offset: Offset along normal for plane. Default 0.0
    position: Initial position [x, y, z]. Default [0, 0, 0]
    orientation: Initial orientation quaternion [x, y, z, w]. Default [0, 0, 0, 1] (identity)
    velocity: Initial linear velocity [x, y, z]. Default [0, 0, 0]
    angular_velocity: Initial angular velocity [x, y, z]. Default [0, 0, 0]
    restitution: Bounciness (0.0 = no bounce, 1.0 = perfect bounce). Default 0.5
    friction: Surface friction (0.0 = ice, 1.0 = rubber). Default 0.5
    is_sensor: If true, detects collisions but doesn't respond physically. Default false
    linear_damping: Linear velocity damping (0.0-1.0) - like air resistance. Default 0.0
    angular_damping: Angular velocity damping (0.0-1.0) - like rotational friction. Default 0.0
    drag_coefficient: Base drag coefficient (Cd) for orientation-dependent drag. Optional
    drag_area: Reference cross-sectional area (m²) for drag calculation. Optional
    drag_axis_ratios: Drag variation along body axes [x, y, z]. E.g., [1.0, 0.2, 1.0] for streamlined along Y. Optional
    fluid_density: Fluid density (kg/m³). Air=1.225, Water=1000. Default 1.225

Returns:
    body_id (echo of the input ID)

Tips for LLMs:
    - Create ground FIRST: body_type="static", shape="plane", normal=[0, 1, 0]
    - Box size is full width/height/depth (not half-extents)
    - Sphere size is [radius] (array with one element)
    - Quaternions: identity = [0, 0, 0, 1] (no rotation)
    - Common restitution: steel=0.8, wood=0.5, clay=0.1
    - Common friction: ice=0.05, wood=0.4, rubber=1.0

Example:
    # Add a ground plane
    await add_rigid_body(
        sim_id=sim_id,
        body_id="ground",
        body_type="static",
        shape="plane",
        normal=[0, 1, 0]
    )

    # Add a bouncing ball
    await add_rigid_body(
        sim_id=sim_id,
        body_id="ball",
        body_type="dynamic",
        shape="sphere",
        size=[0.5],  # radius = 0.5m
        mass=1.0,
        position=[0, 10, 0],
        restitution=0.7
    )

    # Add a falling box
    await add_rigid_body(
        sim_id=sim_id,
        body_id="box",
        body_type="dynamic",
        shape="box",
        size=[1.0, 1.0, 1.0],
        mass=10.0,
        position=[0.0, 5.0, 0.0]
    )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sim_idYes
body_idYes
body_typeYes
shapeYes
sizeNo
massNo
normalNo
offsetNo
positionNo
orientationNo
velocityNo
angular_velocityNo
restitutionNo
frictionNo
is_sensorNo
linear_dampingNo
angular_dampingNo
drag_coefficientNo
drag_areaNo
drag_axis_ratiosNo
fluid_densityNo
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description carries the full burden. It explains how body types behave, collision interactions, sensor mode, drag physics, default values, and return value. It also clarifies nuances like box size being full extents and plane shape not needing size. Extremely transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: summary, parameter list, tips, examples. It is front-loaded with purpose. However, it is somewhat verbose—each parameter has a sentence explaining its default—but this is justified by the complexity (21 parameters). A minor improvement would be to group defaults more succinctly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description still explains the return value (body_id). It covers all parameters, prerequisites, behavioral nuances (collisions, sensor mode, drag), and provides multiple examples. For a 21-parameter tool, this is highly complete. Missing error handling info, but acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must (and does) provide all parameter details. It explains each parameter's meaning, valid values, defaults, and inter-dependencies (e.g., plane uses normal/offset). Examples illustrate usage. This adds immense value beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it adds a rigid body to an existing simulation, with detailed subtypes (static, dynamic, kinematic). It distinguishes from siblings like create_simulation (creates the simulation) and add_joint (adds constraints). The example usage makes its purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the simulation must already exist (prerequisite). It provides tips like creating ground first and shows common use cases in examples. However, it does not explicitly exclude alternative tools or state when not to use this tool (e.g., for modifying existing bodies). But the context is clear enough for an agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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