Skip to main content
Glama
IBM

Physics MCP Server

by IBM

add_rigid_body

Add a physics body to a simulation by specifying its type (static, dynamic, or kinematic), shape, mass, and initial conditions for realistic collision interactions.

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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It comprehensively describes behavioral traits: it's a creation/mutation tool (implied by 'Creates a new physics body'), specifies body types and their interactions (static, dynamic, kinematic), includes default values for many parameters, and provides practical tips (e.g., create ground first, common restitution/friction values).

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 appropriately sized for a complex tool with 21 parameters, front-loaded with purpose and key details, and structured with sections (Args, Returns, Tips, Example). Some redundancy exists (e.g., repeating default values in tips), but overall it's efficient with minimal waste.

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?

Given the tool's complexity (21 parameters, no annotations, no output schema), the description is complete enough. It covers purpose, detailed parameter semantics, behavioral context, usage examples, and return value, providing all necessary information for an AI agent to invoke the tool correctly without relying on structured fields.

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?

Given schema description coverage is 0%, the description fully compensates by adding detailed meaning for all 21 parameters. It explains each parameter's purpose, provides examples for shape-specific size formats, lists enum values for body_type and shape, and includes default values and practical tips (e.g., quaternion identity, common material values).

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 the tool's purpose with specific verb ('Add') and resource ('rigid body to an existing simulation'), and distinguishes it from siblings by specifying it creates a new physics body with shape, mass, and initial conditions for interaction via collisions, unlike calculation or analysis tools.

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 provides clear context for when to use this tool (e.g., 'Create ground FIRST' tip, example for adding ground plane, bouncing ball, falling box) and implies prerequisites (requires sim_id from create_simulation). However, it does not explicitly state when not to use it or name alternatives among siblings.

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