Data source: Compendium of Physical Activities
Overview
Calories Burned performs computations on your inputs — no external data source required. This tutorial covers all 5 tools with parameter reference and code examples.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-calories-burned": {
"url": "https://context.gnist.ai/mcp/calories-burned/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (5)
calculate_calories_burned
Calculate calories burned for a physical activity. Uses MET (Metabolic Equivalent of Task) values from the Compendium of Physical Activities. Formula: calories = MET * 3.5 * weight_kg / 200 * duration_minutes.
| Parameter | Type | Required | Description |
|---|---|---|---|
activity | string | required | Activity ID (e.g. running-5mph, cycling-moderate, yoga-hatha). |
weight_kg | number | required | Body weight in kilograms. |
duration_minutes | number | required | Duration of activity in minutes. |
curl -X POST "https://context.gnist.ai/mcp/calories-burned/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "calculate_calories_burned", "arguments": {"activity": "running-5mph", "weight_kg": 1.0, "duration_minutes": 1.0}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/calories-burned/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'activity': 'running-5mph',
'duration_minutes': 1.0,
'weight_kg': 1.0},
'name': 'calculate_calories_burned'}},
)
print(resp.json())
search_activities
Search available physical activities by name or category.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search by activity name or category (e.g. 'running', 'swimming'). |
limit | integer | optional | (default: 20) |
curl -X POST "https://context.gnist.ai/mcp/calories-burned/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_activities", "arguments": {"query": "'running'"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/calories-burned/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'query': "'running'"}, 'name': 'search_activities'}},
)
print(resp.json())
list_activities_by_category
List all activities in a given category.
| Parameter | Type | Required | Description |
|---|---|---|---|
category | string | required | Activity category (e.g. Running, Swimming, Gym, Sports). |
curl -X POST "https://context.gnist.ai/mcp/calories-burned/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "list_activities_by_category", "arguments": {"category": "Running"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/calories-burned/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'category': 'Running'},
'name': 'list_activities_by_category'}},
)
print(resp.json())
get_activity_categories
List all available activity categories.
curl -X POST "https://context.gnist.ai/mcp/calories-burned/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_activity_categories", "arguments": {}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/calories-burned/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {}, 'name': 'get_activity_categories'}},
)
print(resp.json())
report_feedback
Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/calories-burned/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/calories-burned/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())
Common Patterns
Use
search_activities to find items, then get_activity_categories to get full details. This two-step pattern is common for exploring data before drilling down.Several tools support
limit, offset, or page parameters. Start with small limits during development, then increase for production queries.FAQ
What data does Calories Burned provide?
Calculate caloric expenditure by activity, duration, and body weight using MET values. It exposes 5 tools: calculate_calories_burned, search_activities, list_activities_by_category, get_activity_categories, report_feedback.
Does this toolkit require external data?
No. It performs computations on your inputs directly. You only need a Gnist API key.
What format does the Calories Burned API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.