Skip to main content
Glama
IBM

Physics MCP Server

by IBM

add_joint

Connect two rigid bodies with constraints like hinges, sliders, or fixed connections to simulate realistic mechanical interactions in physics simulations.

Instructions

Add a joint/constraint to connect two rigid bodies.

Joints allow you to constrain the motion between bodies:
- FIXED: Rigid connection (glue objects together)
- REVOLUTE: Hinge rotation around an axis (doors, pendulums)
- SPHERICAL: Ball-and-socket rotation (ragdolls, gimbals)
- PRISMATIC: Sliding along an axis (pistons, elevators)

Args:
    sim_id: Simulation identifier
    joint: Joint definition with type and parameters

Returns:
    joint_id: Unique identifier for the created joint

Example - Simple Pendulum:
    # Create fixed anchor point
    add_rigid_body(
        sim_id=sim_id,
        body_id="anchor",
        body_type="static",
        shape="sphere",
        size=[0.05],
        position=[0.0, 5.0, 0.0],
    )

    # Create pendulum bob
    add_rigid_body(
        sim_id=sim_id,
        body_id="bob",
        body_type="dynamic",
        shape="sphere",
        size=[0.1],
        mass=1.0,
        position=[0.0, 3.0, 0.0],
    )

    # Connect with revolute joint (hinge)
    add_joint(
        sim_id=sim_id,
        joint=JointDefinition(
            id="pendulum_joint",
            joint_type="revolute",
            body_a="anchor",
            body_b="bob",
            anchor_a=[0.0, 0.0, 0.0],  # Center of anchor
            anchor_b=[0.0, 0.1, 0.0],   # Top of bob
            axis=[0.0, 0.0, 1.0],        # Rotate around Z-axis
        ),
    )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sim_idYes
jointYes
Behavior4/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 effectively describes that the tool creates a joint (a write operation), returns a unique joint_id, and includes a detailed example showing how to use it with other tools. It covers the creation outcome and integration context, though it lacks details on error conditions or performance limits.

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 and front-loaded with the core purpose, followed by joint type explanations, args/returns sections, and a comprehensive example. Every sentence adds value, but the example is lengthy (though informative), slightly reducing conciseness. Overall, it's efficient and organized.

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

Completeness4/5

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

Given the complexity (a write operation with 2 parameters, no annotations, no output schema), the description is mostly complete. It explains the tool's purpose, parameters, return value, and provides a detailed usage example. However, it lacks explicit error handling or constraints information, which could be useful for a mutation tool, preventing a perfect score.

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?

The schema description coverage is 0%, so the description must fully compensate. It adds significant meaning beyond the minimal schema: it explains that 'sim_id' is a simulation identifier and 'joint' is a joint definition with type and parameters, listing specific joint types (FIXED, REVOLUTE, etc.) and providing an example with detailed parameter values. This thoroughly clarifies parameter semantics.

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: 'Add a joint/constraint to connect two rigid bodies.' It specifies the verb ('add'), resource ('joint/constraint'), and target ('two rigid bodies'), distinguishing it from sibling tools like 'add_rigid_body' (which creates bodies) and various calculation tools. The detailed joint type explanations further clarify its function.

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: to connect rigid bodies with specific joint types (e.g., for doors, pendulums, pistons). It implies usage after creating bodies with 'add_rigid_body', as shown in the example. However, it does not explicitly state when not to use it or name alternatives among siblings, which prevents a perfect score.

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