Quick validation for empty strings and whitespace-only text. Call `/v1/string/is-empty` with your text or use the MCP tool in Cursor and other editors. Returns boolean true/false — perfect for form validation, data cleaning, or input sanitization. Handles edge cases like tabs, newlines, and Unicode whitespace that basic length checks miss.
curl "https://tinyfn.io/v1/string/is-empty" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/string/is-empty', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/string/is-empty',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's string tools:
{
"mcpServers": {
"tinyfn-string": {
"url": "https://tinyfn.io/mcp/string",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Empty strings, null values, and strings containing only whitespace characters (spaces, tabs, newlines, Unicode whitespace) all return true.
Call the is-empty tool with your text string. It returns a boolean — true for empty/whitespace-only, false for actual content.
Yes, it properly detects all Unicode whitespace categories, not just ASCII spaces and tabs like basic trim() functions.
GET request to `/v1/string/is-empty` with your text as a parameter. Returns JSON with boolean result.
Yes — length checks miss whitespace-only strings. This tool catches ' ' or '\t\n' as empty, which length > 0 would miss.