Validates whether a number is positive (greater than zero) with deterministic boolean output. Available through GET /v1/math/is-positive or as an MCP tool in Cursor and Claude Code. Returns true for 5.7, false for -3 and 0. Essential for data validation pipelines where AI agents need reliable numeric classification without computational errors.
curl "https://tinyfn.io/v1/math/is-positive" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/math/is-positive', {
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-positive',
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"
}
}
}
}
Only numbers greater than zero return true. Zero and negative numbers return false.
Call the is-positive tool directly in your MCP-enabled environment. The AI agent will get a deterministic boolean response instead of potentially incorrect calculations.
Yes, it correctly processes decimals like 3.14159 and scientific notation like 1.5e-10, returning true for any value > 0.
This tool provides guaranteed accuracy for edge cases, handles various number formats consistently, and gives AI agents reliable results without floating-point comparison issues.
This tool validates one number per request. For bulk validation, make separate API calls or use it iteratively within your MCP workflow.