Format List transforms arrays into grammatically correct text with proper conjunctions and punctuation. Access via GET /v1/format/list or through MCP in Cursor and other AI editors. Pass ["apple", "banana", "cherry"] and get "apple, banana, and cherry" with Oxford comma support. Handles edge cases like single items and empty arrays deterministically.
curl "https://tinyfn.io/v1/format/list" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/format/list', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/format/list',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's formatting tools:
{
"mcpServers": {
"tinyfn-format": {
"url": "https://tinyfn.io/mcp/format",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Call the format_list tool with your array of items. It automatically adds commas, conjunctions, and handles Oxford comma rules for proper English grammar.
Single items return as-is without commas. Two items get joined with 'and' (no comma). Three or more items get full comma separation with Oxford comma.
The tool uses 'and' as the default conjunction. Check the API documentation for parameters that might allow custom conjunctions like 'or'.
Empty arrays typically return empty strings or appropriate null responses. The deterministic behavior ensures consistent handling of edge cases.
Use format list when you need proper English grammar for user-facing text. Simple joins lack Oxford commas and proper conjunction placement for readability.