Skip to main content
Glama
IBM

Physics MCP Server

by IBM

calculate_instantaneous_velocity

Calculate velocity at a specific time using position-time data. Uses interpolation between data points or numerical differentiation to determine instantaneous velocity vector and speed magnitude.

Instructions

Calculate instantaneous velocity at a specific time.

Uses interpolation if target_time is between data points,
otherwise uses numerical differentiation.

Args:
    positions: Position vectors [[x,y,z], ...] in meters (or JSON string)
    times: Time values in seconds (or JSON string)
    target_time: Time at which to calculate velocity in seconds

Returns:
    Dict containing:
        - velocity: Velocity vector [x,y,z] in m/s
        - speed: Speed magnitude in m/s
        - interpolated: Whether interpolation was used
        - time: Target time (echo)

Example:
    result = await calculate_instantaneous_velocity(
        positions=[[0,0,0], [3,4,0], [6,8,0]],
        times=[0, 1, 2],
        target_time=1.0
    )
    # speed = 5 m/s

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
positionsYes
timesYes
target_timeYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively explains key behaviors: the interpolation method for intermediate times, numerical differentiation otherwise, and the return structure including velocity vector, speed, interpolation flag, and time echo. However, it lacks details on error handling, input validation, or performance considerations.

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 and front-loaded with the purpose, followed by behavioral details, parameter explanations, return values, and a practical example. Every sentence adds value without redundancy, making it efficient and easy to parse.

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?

Given the tool's complexity (numerical computation with multiple behaviors), no annotations, and no output schema, the description does a strong job by covering purpose, usage, parameters, and returns. However, it could be more complete by addressing edge cases (e.g., out-of-range times) or linking to related tools like 'calculate_acceleration_from_position' for further analysis.

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 schema description coverage is 0%, so the description must fully compensate. It does so by clearly explaining all three parameters: 'positions' as position vectors in meters (with JSON string alternative), 'times' as time values in seconds (with JSON string alternative), and 'target_time' as the specific time for calculation. 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 clearly states the tool's purpose: 'Calculate instantaneous velocity at a specific time.' It specifies the verb ('calculate'), resource ('instantaneous velocity'), and scope ('at a specific time'), distinguishing it from sibling tools like 'calculate_average_speed' or 'calculate_acceleration_from_position'.

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 provides clear context on when to use the tool by explaining its interpolation and differentiation behavior, but it does not explicitly mention when not to use it or name specific alternatives among the many sibling tools, such as 'calculate_average_speed' for non-instantaneous calculations.

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