String Utilities

Is Empty

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.

API Endpoint

GET /v1/string/is-empty

Code Examples

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)

Use via MCP

Add to your AI agent

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"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What counts as empty text in the is-empty check?

Empty strings, null values, and strings containing only whitespace characters (spaces, tabs, newlines, Unicode whitespace) all return true.

How do I use is-empty validation in my MCP-enabled editor?

Call the is-empty tool with your text string. It returns a boolean — true for empty/whitespace-only, false for actual content.

Does is-empty handle Unicode whitespace characters?

Yes, it properly detects all Unicode whitespace categories, not just ASCII spaces and tabs like basic trim() functions.

What's the REST API format for checking empty strings?

GET request to `/v1/string/is-empty` with your text as a parameter. Returns JSON with boolean result.

Is is-empty better than just checking string length?

Yes — length checks miss whitespace-only strings. This tool catches ' ' or '\t\n' as empty, which length > 0 would miss.

Try Is Empty Now

Get your free API key and start using Is Empty in seconds.

Get Free API Key