Skip to main content
Glama
IBM

Physics MCP Server

by IBM

calculate_moment_of_inertia

Calculate moment of inertia for various shapes using mass, dimensions, and rotation axis.

Instructions

Calculate moment of inertia for various shapes.

Moment of inertia (I) is the rotational equivalent of mass. It determines
how difficult it is to change an object's rotation. Depends on both mass
distribution and rotation axis.

Args:
    shape: Shape type - "sphere", "solid_sphere", "hollow_sphere", "rod", "disk", "cylinder", "box"
    mass: Mass in kilograms
    radius: Radius for sphere/disk/cylinder (meters)
    length: Length for rod (meters)
    width: Width for box (meters)
    height: Height for box/cylinder (meters)
    depth: Depth for box (meters)
    axis: Rotation axis - "center", "end" (for rod), "x", "y", "z" (for box)

Returns:
    Dict containing:
        - moment_of_inertia: I in kg⋅m²
        - shape: Shape type
        - axis: Rotation axis

Common formulas:
    - Solid sphere (center): I = (2/5)mr²
    - Hollow sphere (center): I = (2/3)mr²
    - Rod (center): I = (1/12)mL²
    - Rod (end): I = (1/3)mL²
    - Disk (center): I = (1/2)mr²

Example - Spinning wheel:
    result = await calculate_moment_of_inertia(
        shape="disk",
        mass=5.0,  # 5kg wheel
        radius=0.3  # 30cm radius
    )
    # I = 0.225 kg⋅m²

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shapeYes
massYes
radiusNo
lengthNo
widthNo
heightNo
depthNo
axisNocenter

Implementation Reference

  • MCP tool endpoint decorated with @tool. Accepts shape, mass, radius, length, width, height, depth, axis as parameters and delegates to the core handler in ../rotational.py.
    @tool  # type: ignore[arg-type]
    async def calculate_moment_of_inertia(
        shape: str,
        mass: float,
        radius: Optional[float] = None,
        length: Optional[float] = None,
        width: Optional[float] = None,
        height: Optional[float] = None,
        depth: Optional[float] = None,
        axis: str = "center",
    ) -> dict:
        """Calculate moment of inertia for various shapes.
    
        Moment of inertia (I) is the rotational equivalent of mass. It determines
        how difficult it is to change an object's rotation. Depends on both mass
        distribution and rotation axis.
    
        Args:
            shape: Shape type - "sphere", "solid_sphere", "hollow_sphere", "rod", "disk", "cylinder", "box"
            mass: Mass in kilograms
            radius: Radius for sphere/disk/cylinder (meters)
            length: Length for rod (meters)
            width: Width for box (meters)
            height: Height for box/cylinder (meters)
            depth: Depth for box (meters)
            axis: Rotation axis - "center", "end" (for rod), "x", "y", "z" (for box)
    
        Returns:
            Dict containing:
                - moment_of_inertia: I in kg⋅m²
                - shape: Shape type
                - axis: Rotation axis
    
        Common formulas:
            - Solid sphere (center): I = (2/5)mr²
            - Hollow sphere (center): I = (2/3)mr²
            - Rod (center): I = (1/12)mL²
            - Rod (end): I = (1/3)mL²
            - Disk (center): I = (1/2)mr²
    
        Example - Spinning wheel:
            result = await calculate_moment_of_inertia(
                shape="disk",
                mass=5.0,  # 5kg wheel
                radius=0.3  # 30cm radius
            )
            # I = 0.225 kg⋅m²
        """
        from ..rotational import MomentOfInertiaRequest, calculate_moment_of_inertia as calc_moi
    
        request = MomentOfInertiaRequest(
            shape=shape,  # type: ignore
            mass=mass,
            radius=radius,
            length=length,
            width=width,
            height=height,
            depth=depth,
            axis=axis,
        )
        response = calc_moi(request)
        return response.model_dump()
Behavior4/5

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

With no annotations, the description carries the full burden. It explains the concept of moment of inertia, lists formulas, and provides an example. However, it does not disclose behavior for invalid inputs, edge cases, or how missing parameters are handled (e.g., when shape requires length but not provided).

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

Conciseness3/5

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

The description is thorough but lengthy, including a general definition of moment of inertia that may be unnecessary. It is front-loaded with purpose, but later sections (formulas, example) could be abbreviated without losing clarity.

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 8 parameters and no output schema, the description explains inputs thoroughly and provides a minimal output dict. It lacks error handling details and behavior for invalid combinations (e.g., rod without length), but overall covers most aspects adequately.

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 input schema has 0% description coverage, so the description must compensate, and it does excellently. Each parameter is explained with context (units, allowed values, dependencies on shape). Common formulas show how parameters relate, adding significant meaning beyond schema names.

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 calculates moment of inertia for various shapes. It lists specific shapes and provides formulas, making its purpose unambiguous and distinguishable from sibling tools that perform other physics calculations.

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

Usage Guidelines3/5

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

The description implies usage for rotational inertia problems but does not explicitly state when to use this tool versus others like calculate_torque or calculate_angular_momentum. No exclusion criteria or alternative recommendations are provided.

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