Skip to main content
Glama
IBM

Physics MCP Server

by IBM

calculate_normal_force

Compute normal force on an incline using mass, angle, and optional additional force. Returns normal force and weight components parallel and perpendicular to the surface.

Instructions

Calculate normal force on an inclined plane.

On an incline at angle θ:
- N = mg cos(θ) + F_additional
- Weight component perpendicular: mg cos(θ)
- Weight component parallel: mg sin(θ)

Args:
    mass: Object mass in kg
    gravity: Gravitational acceleration in m/s² (default 9.81)
    angle_degrees: Incline angle in degrees (0 = horizontal)
    additional_force: Additional perpendicular force in Newtons (optional)

Returns:
    Dict containing:
        - normal_force: Normal force in Newtons
        - weight_component_perpendicular: Weight component ⊥ to surface
        - weight_component_parallel: Weight component ∥ to surface

Example - Box on 30° ramp:
    result = await calculate_normal_force(
        mass=10.0,
        angle_degrees=30.0
    )
    # normal_force ≈ 84.9 N

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
massYes
gravityNo
angle_degreesNo
additional_forceNo

Implementation Reference

  • MCP tool handler function for calculate_normal_force. This is the @tool-decorated async function that is the public MCP interface. It accepts mass, gravity, angle_degrees, and optional additional_force, creates a NormalForceRequest, delegates to the core implementation in ..statics, and returns a dict via model_dump().
    @tool  # type: ignore[arg-type]
    async def calculate_normal_force(
        mass: float,
        gravity: float = 9.81,
        angle_degrees: float = 0.0,
        additional_force: float | None = None,
    ) -> dict:
        """Calculate normal force on an inclined plane.
    
        On an incline at angle θ:
        - N = mg cos(θ) + F_additional
        - Weight component perpendicular: mg cos(θ)
        - Weight component parallel: mg sin(θ)
    
        Args:
            mass: Object mass in kg
            gravity: Gravitational acceleration in m/s² (default 9.81)
            angle_degrees: Incline angle in degrees (0 = horizontal)
            additional_force: Additional perpendicular force in Newtons (optional)
    
        Returns:
            Dict containing:
                - normal_force: Normal force in Newtons
                - weight_component_perpendicular: Weight component ⊥ to surface
                - weight_component_parallel: Weight component ∥ to surface
    
        Example - Box on 30° ramp:
            result = await calculate_normal_force(
                mass=10.0,
                angle_degrees=30.0
            )
            # normal_force ≈ 84.9 N
        """
        from ..statics import NormalForceRequest
        from ..statics import calculate_normal_force as calc_normal
    
        request = NormalForceRequest(
            mass=mass,
            gravity=gravity,
            angle_degrees=angle_degrees,
            additional_force=additional_force,
        )
        response = calc_normal(request)
        return response.model_dump()
  • NormalForceRequest Pydantic model - input schema defining mass (float >0), gravity (default 9.81), angle_degrees (0-90), and optional additional_force.
    class NormalForceRequest(BaseModel):
        """Request for normal force calculation."""
    
        mass: float = Field(..., description="Object mass in kg", gt=0.0)
        gravity: float = Field(default=9.81, description="Gravitational acceleration in m/s²", gt=0.0)
        angle_degrees: float = Field(
            default=0.0, description="Incline angle in degrees (0 = horizontal)", ge=0.0, le=90.0
        )
        additional_force: Optional[float] = Field(
            None, description="Additional perpendicular force in Newtons (optional)"
        )
  • NormalForceResponse Pydantic model - output schema with normal_force, weight_component_perpendicular, and weight_component_parallel (all floats in Newtons).
    class NormalForceResponse(BaseModel):
        """Response for normal force calculation."""
    
        normal_force: float = Field(..., description="Normal force in Newtons")
        weight_component_perpendicular: float = Field(
            ..., description="Weight component perpendicular to surface in Newtons"
        )
        weight_component_parallel: float = Field(
            ..., description="Weight component parallel to surface in Newtons"
        )
  • Core implementation function. Takes a NormalForceRequest, calculates weight = mass*gravity, converts angle to radians, computes perpendicular (mg cosθ) and parallel (mg sinθ) components, adds optional additional_force, returns NormalForceResponse.
    def calculate_normal_force(request: NormalForceRequest) -> NormalForceResponse:
        """Calculate normal force on an inclined plane.
    
        On an incline at angle θ:
        - N = mg cos(θ) + F_additional
        - Weight component perpendicular: mg cos(θ)
        - Weight component parallel: mg sin(θ)
    
        Args:
            request: Normal force request
    
        Returns:
            Normal force and weight components
        """
        weight = request.mass * request.gravity
        angle_rad = math.radians(request.angle_degrees)
    
        weight_perpendicular = weight * math.cos(angle_rad)
        weight_parallel = weight * math.sin(angle_rad)
    
        normal_force = weight_perpendicular
        if request.additional_force is not None:
            normal_force += request.additional_force
    
        return NormalForceResponse(
            normal_force=normal_force,
            weight_component_perpendicular=weight_perpendicular,
            weight_component_parallel=weight_parallel,
        )
  • Tool registration via the @tool decorator (from chuk_mcp_server) applied to the calculate_normal_force async function at line 165.
    from chuk_mcp_server import tool
Behavior4/5

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

Given no annotations, the description explains the calculation, includes formulas, default values, and return values. It is transparent but could mention limitations like angle ranges.

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

Conciseness5/5

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

The description is well-structured with formulas, parameter descriptions, return dict, and an example. Every sentence adds value without being verbose.

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?

For a formula-based physics tool with no output schema, the description is complete: it explains formulas, parameters, return values, and includes an example.

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?

With 0% schema coverage, the description fully compensates by detailing each parameter (mass, gravity, angle_degrees, additional_force), including units, defaults, and formula relation.

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 it calculates normal force on an inclined plane, provides the formula, and distinguishes from sibling tools by specific context (inclined plane).

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 use for inclined plane normal force but lacks explicit guidance on when to use vs alternative tools or when not to use this tool.

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