Health Utilities

Calculate Bmi

Calculate Body Mass Index using weight and height inputs via GET /v1/health/bmi. Returns precise BMI value with standard health category classification (underweight, normal, overweight, obese). Essential for health apps and fitness tracking integrations in Cursor or Claude Code workflows.

API Endpoint

GET /v1/health/bmi

Code Examples

curl "https://tinyfn.io/v1/health/bmi" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/health/bmi', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/health/bmi',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's health tools:

{
  "mcpServers": {
    "tinyfn-health": {
      "url": "https://tinyfn.io/mcp/health",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I calculate BMI using the TinyFn API?

Send a GET request to /v1/health/bmi with weight and height parameters. Returns BMI value and health category classification.

What units does the BMI calculator accept?

Accepts both metric (kg/cm) and imperial (lbs/inches) units. Specify the unit system in your API request parameters.

Can MCP tools in Cursor calculate BMI for patient data analysis?

Yes, the BMI MCP tool integrates directly into Cursor workflows for processing health datasets and generating patient reports.

What BMI categories does TinyFn return?

Returns standard WHO categories: underweight (<18.5), normal (18.5-24.9), overweight (25-29.9), and obese (≥30).

Does the BMI calculation handle edge cases like zero values?

Yes, validates inputs and returns appropriate error messages for invalid weight/height values to prevent division errors.

Try Calculate Bmi Now

Get your free API key and start using Calculate Bmi in seconds.

Get Free API Key