Skip to main content
Glama
IBM

Physics MCP Server

by IBM

calculate_center_of_mass

Calculates the center of mass for a system of point masses from mass and position data, providing the equilibrium point in 3D space and total system mass.

Instructions

Calculate center of mass for a system of point masses.

Formula: r_cm = Σ(m_i × r_i) / Σm_i

Args:
    masses: List of masses in kg (or JSON string)
    positions: List of positions [[x,y,z], ...] in meters (or JSON string)

Returns:
    Dict containing:
        - center_of_mass: Position [x, y, z] in meters
        - total_mass: Total system mass in kg

Example - Three-mass system:
    result = await calculate_center_of_mass(
        masses=[1.0, 2.0, 3.0],
        positions=[[0,0,0], [1,0,0], [2,0,0]]
    )
    # center_of_mass ≈ [1.5, 0, 0]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
massesYes
positionsYes
Behavior4/5

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

The description discloses the calculation formula, expected input units (kg, meters), and the return structure including center_of_mass and total_mass. Since no annotations are provided, the description carries the full burden and does so effectively, though missing potential error conditions.

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-organized with sections for formula, args, returns, and an example. Every sentence adds value, and there is no redundancy or wasted text.

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?

The description is complete for a calculation tool: it explains inputs, units, outputs, and provides an example. Minor gaps exist, such as error handling for empty lists or mismatched dimensions, but overall it is sufficient.

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 only specifies types as 'string', but the description explains that masses should be a list of floats in kg and positions a list of coordinates in meters, optionally as JSON strings. This adds essential meaning beyond the 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 explicitly states 'Calculate center of mass for a system of point masses' and provides the formula, clearly differentiating it from sibling tools that calculate other physical quantities.

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?

While the purpose is clear, the description does not provide explicit guidance on when to use this tool versus alternatives like calculate_moment_of_inertia. The example offers usage context but no exclusions.

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