Skip to main content
Glama
chrishayuk

Physics MCP Server

by chrishayuk

calculate_hookes_law

Calculate spring force and elastic potential energy using Hooke's Law. Input spring constant and displacement to determine restoring force magnitude and stored energy for springs and elastic materials.

Instructions

Calculate spring force using Hooke's Law: F = -kx.

The restoring force is proportional to displacement from equilibrium. Fundamental for springs, elastic materials, and simple harmonic motion. Args: spring_constant: Spring constant k in N/m (stiffness) displacement: Displacement from equilibrium in meters Returns: Dict containing: - force: Restoring force magnitude in Newtons - potential_energy: Elastic potential energy in Joules Tips for LLMs: - Stiffer spring → larger k → more force for same displacement - Potential energy stored in spring: PE = (1/2)kx² - Negative sign in F = -kx means force opposes displacement Example - Compressing a car spring: result = await calculate_hookes_law( spring_constant=10000, # N/m (stiff car spring) displacement=0.05 # 5cm compression ) # Force = 500 N, PE = 12.5 J

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spring_constantYes
displacementYes

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/chrishayuk/chuk-mcp-physics'

If you have feedback or need assistance with the MCP directory API, please join our Discord server