Performs precise addition of two or more numbers with deterministic results. Use via MCP in Cursor, Windsurf, or other AI coding tools, or call GET /v1/math/add directly. Example: adding 15.7 + 23.2 + 8.1 returns exactly 47.0. Handles integers, decimals, and scientific notation without floating-point precision issues.
curl "https://tinyfn.io/v1/math/add" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/math/add', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/math/add',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's math tools:
{
"mcpServers": {
"tinyfn-math": {
"url": "https://tinyfn.io/mcp/math",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Pass numbers as query parameters or in the request body. The tool accepts any quantity of numbers and returns their exact sum.
Yes, it provides deterministic results without typical JavaScript floating-point errors like 0.1 + 0.2 = 0.30000000000000004.
Absolutely. AI agents in Cursor, Claude Code, Windsurf, and others can call this tool for reliable arithmetic instead of potentially incorrect calculations.
It handles integers, decimals, negative numbers, and scientific notation (like 1.5e10) with consistent precision.
The tool can add numerous values in a single operation, though practical limits depend on URL length for GET requests.