Case Conversion Utilities

Detect Case

Identifies text case patterns like camelCase, snake_case, kebab-case, and PascalCase. Call via MCP in Cursor or Windsurf, or hit GET /v1/case/detect with your text. Returns the detected case type as a string — useful for code analysis, naming convention validation, or preprocessing before case conversion.

API Endpoint

GET /v1/case/detect

Code Examples

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

{
  "mcpServers": {
    "tinyfn-case": {
      "url": "https://tinyfn.io/mcp/case",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What case types can detect case identify?

Detects camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE_CASE, lowercase, UPPERCASE, and mixed patterns. Returns the primary case type found in the text.

How do I use detect case in an MCP-enabled editor?

In Cursor, Claude Code, or Windsurf, call the detect_case tool with your text string. Perfect for AI agents analyzing codebases or validating naming conventions across files.

What happens with mixed case text or edge cases?

Mixed patterns return the dominant case type detected. Single words without separators default to lowercase. Numbers and special characters are handled gracefully.

Can I detect case for multiple strings at once?

Each API call processes one text string. For bulk detection, make multiple requests or integrate into your processing pipeline.

What's the difference between detect case and case conversion tools?

Detect case identifies existing patterns without changing text. Use it before conversion tools to understand current format or validate naming consistency.

Try Detect Case Now

Get your free API key and start using Detect Case in seconds.

Get Free API Key