Skip to main content
Glama
IBM

Physics MCP Server

by IBM

check_collision

Predict whether two moving spheres will collide, and get collision time, location, and impact speed. Ideal for simulating collisions in physics scenarios.

Instructions

Check if two moving spherical objects will collide.

Predicts whether two moving spheres will collide within a time window,
and if so, calculates when and where the collision occurs. Uses analytic
relative motion to find exact collision time (if any).

Args:
    body1_position: Position of first object [x, y, z] in meters
    body1_velocity: Velocity of first object [x, y, z] in m/s
    body1_radius: Radius of first object in meters (must be positive)
    body2_position: Position of second object [x, y, z] in meters
    body2_velocity: Velocity of second object [x, y, z] in m/s
    body2_radius: Radius of second object in meters (must be positive)
    max_time: Maximum time to check in seconds. Default 10.0.

Returns:
    CollisionCheckResponse containing:
        - will_collide: True if collision will occur
        - collision_time: Time until collision in seconds (if collision occurs)
        - collision_point: Approximate collision location [x, y, z] (if collision occurs)
        - impact_speed: Relative velocity at impact in m/s (if collision occurs)
        - closest_approach_distance: Minimum distance between objects
        - closest_approach_time: Time of closest approach

Tips for LLMs:
    - Objects are modeled as spheres (point masses with radius)
    - Collision detection is exact for constant velocity motion
    - Returns earliest collision time if multiple intersections
    - If no collision, check closest_approach_distance to see how close they get
    - Use for: asteroid tracking, car crash prediction, sports ball interactions
    - For complex shapes or forces, use create_simulation instead

Example:
    # Check if two cars will collide
    result = await check_collision(
        body1_position=[0.0, 0.0, 0.0],
        body1_velocity=[10.0, 0.0, 0.0],
        body1_radius=2.0,
        body2_position=[50.0, 1.0, 0.0],
        body2_velocity=[-8.0, 0.0, 0.0],
        body2_radius=2.0
    )
    if result.will_collide:
        print(f"Collision in {result.collision_time:.2f} seconds at {result.impact_speed:.1f} m/s")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
body1_positionYes
body1_velocityYes
body1_radiusYes
body2_positionYes
body2_velocityYes
body2_radiusYes
max_timeNo
Behavior4/5

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

With no annotations, the description bears full responsibility. It explains the underlying model (spheres with constant velocity), the analytic method, and the return values. However, it does not discuss edge cases or error handling, which would make it fully transparent.

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 sections (Args, Returns, Tips, Example) and is appropriately front-loaded. It is somewhat lengthy but justified by the tool's complexity. Minor redundancy in the example could be trimmed.

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?

The description is complete: it explains all parameters, return values, assumptions, and provides a usage example. It covers the tool's behavior thoroughly given the absence of an output schema.

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?

Despite 0% schema coverage, the description thoroughly explains each parameter in the Args section, adding meaning beyond the schema's type definitions (e.g., units, positivity constraints). This compensates for the lack of schema descriptions.

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: "Check if two moving spherical objects will collide." It specifies the exact function and distinguishes itself from siblings by mentioning an alternative tool for complex shapes or forces.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance, including when to use this tool (e.g., asteroid tracking, car crash prediction) and when to use an alternative: "For complex shapes or forces, use create_simulation instead." It also includes an example.

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