Returns true/false for whether a number is even using precise mathematical computation. Available via MCP in Cursor and other AI editors, or REST at GET /v1/math/is-even. Pass any integer and get deterministic boolean output — useful when AI agents need reliable parity checks instead of potentially incorrect calculations.
curl "https://tinyfn.io/v1/math/is-even" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/math/is-even', {
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/is-even',
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"
}
}
}
}
Send GET request to /v1/math/is-even with the number parameter, or use the MCP tool in Cursor/Claude Code. Returns boolean true for even numbers, false for odd.
Works correctly with negative integers — returns true for -2, -4, etc. and false for -1, -3, etc. Uses standard mathematical definition of even/odd.
Yes, handles arbitrarily large integers that fit within standard number representations. More reliable than AI hallucination for edge cases.
Eliminates AI agent calculation errors and provides deterministic results. Particularly useful in MCP workflows where mathematical precision matters.
Designed for integers. Behavior with decimals depends on implementation — typically rounds or returns error for non-whole numbers.