Converts text to Train-Case format where words are capitalized and joined with hyphens (like "Hello-World-Example"). Access via GET /v1/case/train or through MCP in Cursor, Claude Code, and other AI editors. Perfect for CSS class names, URL slugs, and consistent naming conventions. Returns deterministic output regardless of input spacing or punctuation.
curl "https://tinyfn.io/v1/case/train" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/case/train', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/case/train',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's case conversion tools:
{
"mcpServers": {
"tinyfn-case": {
"url": "https://tinyfn.io/mcp/case",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Train-Case capitalizes each word and joins them with hyphens (Hello-World), while kebab-case uses lowercase words with hyphens (hello-world). Train-Case is also called Pascal-Kebab-Case.
Use the to_train_case MCP tool with your text input. The AI agent will call TinyFn's deterministic converter and return the properly formatted Train-Case string.
Special characters are typically removed or replaced with hyphens, while numbers are preserved. Multiple spaces and punctuation collapse into single hyphens between capitalized words.
Yes, make a GET request to /v1/case/train with your text as a query parameter. Returns JSON with the converted Train-Case string.
Train-Case works well for CSS class names that need readability, component names in some frameworks, or when you need kebab-case structure but with better visual separation through capitalization.
Get your free API key and start using To Train Case in seconds.
Get Free API Key