String Utilities

Split

Split divides text into arrays using any delimiter — commas, spaces, custom patterns. Access via MCP in Cursor or Windsurf for instant text parsing, or call GET /v1/string/split with your text and separator. Perfect for CSV processing, log analysis, or breaking down user input. Returns clean string arrays without the delimiter overhead.

API Endpoint

GET /v1/string/split

Code Examples

curl "https://tinyfn.io/v1/string/split" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/string/split', {
  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/split',
    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 do I split a CSV line into individual fields?

Pass your CSV text with delimiter="," to get an array of field values. Handles quoted fields and escapes properly.

Can I split text by multiple characters or regex patterns?

Yes, the delimiter parameter accepts multi-character strings and basic patterns. Use "\n" for newlines or "::" for custom separators.

What happens when I split text that doesn't contain the delimiter?

Returns an array with the original text as the single element. No error, just the input wrapped in an array.

How does Split handle empty strings or consecutive delimiters?

Consecutive delimiters create empty string elements in the result array. Split preserves this structure rather than filtering blanks.

Can MCP agents use Split to parse structured data from user input?

Absolutely. AI agents in Cursor or Cline can split user-provided lists, parse configuration files, or break down multi-part queries into processable chunks.

Try Split Now

Get your free API key and start using Split in seconds.

Get Free API Key