String Utilities

Join

Combines array elements into a single string using a specified delimiter. Access via MCP in Cursor or Windsurf, or call GET /v1/string/join directly. Pass ["apple", "banana", "cherry"] with delimiter "," to get "apple,banana,cherry". Essential for CSV generation, URL construction, and data serialization in AI workflows.

API Endpoint

GET /v1/string/join

Code Examples

curl "https://tinyfn.io/v1/string/join" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/string/join', {
  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/join',
    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 join an array of strings with a custom delimiter?

Send a GET request to /v1/string/join with your array and delimiter parameter. The tool concatenates all elements using your specified separator.

Can I join arrays with empty strings or special characters as delimiters?

Yes, any string works as a delimiter including empty strings, spaces, newlines, or special characters like | or ;.

What happens if I join an array containing null or undefined values?

Null and undefined values are typically converted to empty strings before joining, but check your specific implementation for exact behavior.

How can MCP tools like Cursor use string join for code generation?

AI agents can join code snippets, import statements, or function parameters into properly formatted strings for file generation or template construction.

Is there a difference between using commas vs pipes as delimiters for data output?

Functionally identical in the join operation, but commas create CSV format while pipes work better for data that might contain commas internally.

Try Join Now

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

Get Free API Key