Skip to main content
Glama
IBM

Physics MCP Server

by IBM

calculate_rotational_kinetic_energy

Compute rotational kinetic energy (KE_rot = ½ I ω²) for spinning objects to analyze energy storage and rolling motion.

Instructions

Calculate rotational kinetic energy: KE_rot = (1/2) I ω².

Energy of rotation. A spinning object has kinetic energy even if
its center of mass is stationary.

Args:
    moment_of_inertia: Moment of inertia in kg⋅m²
    angular_velocity: Angular velocity magnitude in rad/s

Returns:
    Dict containing:
        - rotational_ke: Rotational kinetic energy in Joules

Tips for LLMs:
    - Total KE = translational KE + rotational KE
    - Rolling object has both types of kinetic energy
    - Flywheel energy storage uses this principle

Example - Car wheel at highway speed:
    result = await calculate_rotational_kinetic_energy(
        moment_of_inertia=0.5,  # kg⋅m²
        angular_velocity=100.0  # rad/s (fast spinning)
    )
    # KE_rot = 2500 J

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
moment_of_inertiaYes
angular_velocityYes

Implementation Reference

  • Core calculation function: KE_rot = 0.5 * I * ω². Computes rotational kinetic energy from moment of inertia and angular velocity.
    def calculate_rotational_kinetic_energy(
        request: RotationalKineticEnergyRequest,
    ) -> RotationalKineticEnergyResponse:
        """Calculate rotational kinetic energy: KE_rot = (1/2) * I * ω².
    
        Args:
            request: Rotational KE request
    
        Returns:
            Rotational kinetic energy
        """
        inertia = request.moment_of_inertia
        omega = request.angular_velocity
        KE_rot = 0.5 * inertia * omega * omega
    
        return RotationalKineticEnergyResponse(rotational_ke=KE_rot)
  • MCP tool endpoint decorated with @tool. Accepts float parameters, creates a pydantic request, delegates to core function, and returns a dict.
    @tool  # type: ignore[arg-type]
    async def calculate_rotational_kinetic_energy(
        moment_of_inertia: float,
        angular_velocity: float,
    ) -> dict:
        """Calculate rotational kinetic energy: KE_rot = (1/2) I ω².
    
        Energy of rotation. A spinning object has kinetic energy even if
        its center of mass is stationary.
    
        Args:
            moment_of_inertia: Moment of inertia in kg⋅m²
            angular_velocity: Angular velocity magnitude in rad/s
    
        Returns:
            Dict containing:
                - rotational_ke: Rotational kinetic energy in Joules
    
        Tips for LLMs:
            - Total KE = translational KE + rotational KE
            - Rolling object has both types of kinetic energy
            - Flywheel energy storage uses this principle
    
        Example - Car wheel at highway speed:
            result = await calculate_rotational_kinetic_energy(
                moment_of_inertia=0.5,  # kg⋅m²
                angular_velocity=100.0  # rad/s (fast spinning)
            )
            # KE_rot = 2500 J
        """
        from ..rotational import (
            RotationalKineticEnergyRequest,
            calculate_rotational_kinetic_energy as calc_ke_rot,
        )
    
        request = RotationalKineticEnergyRequest(
            moment_of_inertia=moment_of_inertia,
            angular_velocity=angular_velocity,
        )
        response = calc_ke_rot(request)
        return response.model_dump()
  • Pydantic request schema with moment_of_inertia (must be > 0) and angular_velocity fields.
    class RotationalKineticEnergyRequest(BaseModel):
        """Request for rotational kinetic energy calculation."""
    
        moment_of_inertia: float = Field(..., description="Moment of inertia in kg⋅m²", gt=0.0)
        angular_velocity: float = Field(..., description="Angular velocity magnitude in rad/s")
  • Pydantic response schema containing rotational_ke field in Joules.
    class RotationalKineticEnergyResponse(BaseModel):
        """Response for rotational kinetic energy calculation."""
    
        rotational_ke: float = Field(..., description="Rotational kinetic energy in Joules")
  • Tool registration via the @tool decorator from chuk_mcp_server, which registers the function as an MCP tool. Includes type: ignore for the decorator.
    @tool  # type: ignore[arg-type]
    async def calculate_rotational_kinetic_energy(
Behavior4/5

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

No annotations provided, so description carries full burden. It transparently describes return structure and the deterministic calculation, but lacks details on edge cases or validation.

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?

Well-structured with formula, parameter details, example, and tips. Slightly lengthy but each section adds value; front-loaded with key information.

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?

Covers essential aspects for a simple calculation tool: formula, parameters, return dict with unit. No output schema, so description of return value is necessary and provided. Lacks error handling info.

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 provides only numeric types (0% coverage). Description adds units (kg⋅m², rad/s) and clarifies each parameter's physical meaning, fully compensating for schema gaps.

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 explicitly states the tool calculates rotational kinetic energy, provides the formula KE_rot = (1/2) I ω², and distinguishes it from sibling tools like 'calculate_kinetic_energy' by specifying 'rotational'.

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?

Tips explain when to use (total KE, rolling objects, flywheel energy storage) and imply context, but no explicit when-not-to-use or comparison to similar tools.

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