Utilities
Data source: langdetect (open source, port of Google's language-detection)
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/language-detection/
claude_desktop_config.json
{
"mcpServers": {
"gnist-language-detection": {
"url": "https://context.gnist.ai/mcp/language-detection/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/language-detection/" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "detect_language", "arguments": {"text": "example"}}}'
REST API
API Root
https://context.gnist.ai/rest/language-detection/
3 endpoints available:
GET /rest/language-detection/detect_languageGET /rest/language-detection/get_supported_languagesGET /rest/language-detection/report_feedback
Shell
curl "https://context.gnist.ai/rest/language-detection/detect_language?text=example" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/language-detection/detect_language",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"text": "example"
},
)
print(resp.json())
Command Line
Command
gc language-detection
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (3)
detect_languageDetect the language of a text passage with confidence scores.
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | required |
get_supported_languagesList all languages that can be detected.
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |