String Utilities

Is Palindrome

Determines if text reads the same forwards and backwards, ignoring case, spaces, and punctuation. Use via MCP in Cursor or Windsurf, or call GET /v1/string/is-palindrome with your text. Returns true for "A man a plan a canal Panama" and false for "hello world". Perfect for form validation and text processing in AI workflows.

API Endpoint

GET /v1/string/is-palindrome

Code Examples

curl "https://tinyfn.io/v1/string/is-palindrome" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/string/is-palindrome', {
  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-palindrome',
    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

How does palindrome detection handle spaces and punctuation?

The tool ignores whitespace, punctuation, and case when checking. 'A man, a plan, a canal: Panama!' returns true because only alphanumeric characters are compared.

Can I check palindromes in languages other than English?

Yes, it works with any Unicode text including accented characters, emojis, and non-Latin scripts. The comparison is character-based regardless of language.

What's the difference between this and writing my own palindrome function?

This provides deterministic results without implementation bugs. AI agents get reliable answers instead of potentially flawed generated code, especially useful for edge cases with Unicode.

How do I use palindrome checking with MCP in my AI workflow?

In Cursor or Claude Code, your AI agent can call this tool directly to validate user input or process text data. No need to write and debug palindrome logic.

Does it return just true/false or additional information?

Returns a boolean result indicating whether the text is a palindrome. The response is structured for easy parsing in both MCP tools and REST API calls.

Try Is Palindrome Now

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

Get Free API Key