Skip to main content
Glama
IBM

Physics MCP Server

by IBM

track_energy_dissipation

Analyze energy changes over a recorded trajectory to quantify energy loss from damping, bounces, friction, and air resistance, returning kinetic, potential, and total energy per frame along with total dissipation and average power.

Instructions

Track energy dissipation over a trajectory.

Analyzes how energy changes over time in a recorded trajectory.
Useful for understanding damping, bounces, and energy loss mechanisms.

Args:
    trajectory_data: Trajectory data dict with 'frames' field
    mass: Object mass in kg
    gravity: Gravitational acceleration in m/s² (default 9.81)
    reference_height: Reference height for PE in meters (default 0.0)

Returns:
    Dict containing:
        - frames: Energy data for each frame (time, KE, PE, total E)
        - initial_total_energy: Initial total energy in Joules
        - final_total_energy: Final total energy in Joules
        - total_energy_loss: Total energy dissipated in Joules
        - total_energy_loss_percent: % of energy lost
        - average_power_dissipated: Average power in Watts (J/s)

Tips for LLMs:
    - Use after record_trajectory or record_trajectory_with_events
    - Visualize energy vs time to see where energy is lost
    - Identifies bounces, friction effects, air resistance
    - Power = rate of energy dissipation

Example - Bouncing ball energy analysis:
    traj = await record_trajectory_with_events(sim_id, "ball", 600)
    result = await track_energy_dissipation(
        trajectory_data=traj.model_dump(),
        mass=0.5,  # 500g ball
        gravity=9.81
    )
    # See how energy decreases with each bounce

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trajectory_dataYes
massYes
gravityNo
reference_heightNo

Implementation Reference

  • MCP tool entry point decorated with @tool. Takes trajectory_data (dict), mass, gravity, reference_height, converts frames to TrajectoryFrame models, delegates to conservation.track_energy_dissipation, and returns dict.
    @tool  # type: ignore[arg-type]
    async def track_energy_dissipation(
        trajectory_data: dict,
        mass: float,
        gravity: float = 9.81,
        reference_height: float = 0.0,
    ) -> dict:
        """Track energy dissipation over a trajectory.
    
        Analyzes how energy changes over time in a recorded trajectory.
        Useful for understanding damping, bounces, and energy loss mechanisms.
    
        Args:
            trajectory_data: Trajectory data dict with 'frames' field
            mass: Object mass in kg
            gravity: Gravitational acceleration in m/s² (default 9.81)
            reference_height: Reference height for PE in meters (default 0.0)
    
        Returns:
            Dict containing:
                - frames: Energy data for each frame (time, KE, PE, total E)
                - initial_total_energy: Initial total energy in Joules
                - final_total_energy: Final total energy in Joules
                - total_energy_loss: Total energy dissipated in Joules
                - total_energy_loss_percent: % of energy lost
                - average_power_dissipated: Average power in Watts (J/s)
    
        Tips for LLMs:
            - Use after record_trajectory or record_trajectory_with_events
            - Visualize energy vs time to see where energy is lost
            - Identifies bounces, friction effects, air resistance
            - Power = rate of energy dissipation
    
        Example - Bouncing ball energy analysis:
            traj = await record_trajectory_with_events(sim_id, "ball", 600)
            result = await track_energy_dissipation(
                trajectory_data=traj.model_dump(),
                mass=0.5,  # 500g ball
                gravity=9.81
            )
            # See how energy decreases with each bounce
        """
        from ..conservation import EnergyDissipationTrackingRequest, track_energy_dissipation as track_E
        from ..models import TrajectoryFrame
    
        # Extract frames from trajectory data
        frames_data = trajectory_data.get("frames", [])
        frames = [TrajectoryFrame.model_validate(f) for f in frames_data]
    
        request = EnergyDissipationTrackingRequest(
            frames=frames,
            mass=mass,
            gravity=gravity,
            reference_height=reference_height,
        )
        response = track_E(request)
        return response.model_dump()
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It details the return structure (frames, initial/final energy, loss, power) and explains that it analyzes damping, bounces, and energy loss mechanisms. No side effects or contradictory information.

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 with clear sections (Description, Args, Returns, Tips, Example). It is somewhat lengthy but every section adds value. The opening sentence is front-loaded and clear.

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 complexity (4 params, nested object, no output schema in structured data), the description is complete. It covers all parameters, return values in detail, includes an example, and provides usage tips. No gaps.

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%, but the description provides detailed parameter documentation in the Args section: trajectory_data (dict with 'frames' field), mass (kg), gravity (default 9.81), reference_height (default 0). This adds essential meaning beyond the bare 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 states 'Track energy dissipation over a trajectory' and explains it analyzes energy changes over time. This clearly distinguishes it from sibling tools like calculate_kinetic_energy or check_energy_conservation, which focus on static calculations or conservation checks rather than trajectory analysis.

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 explicitly recommends using this tool after record_trajectory or record_trajectory_with_events, and provides tips for interpretation (e.g., visualize energy vs time). It does not explicitly state when not to use it, but the context is clear enough.

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