classify_text
Classify text by sentiment, toxicity, spam, and language using keyword heuristics. Receive scores, character and word counts, and cost for any text input.
Instructions
Classify a piece of text with keyword heuristics.
Not a trained NLP or toxicity model. Scores sentiment (positive/negative/neutral), keyword toxicity, keyword spam, and optional langdetect language.
Args: text: The text to classify (up to ~5,000 characters recommended)
Returns: dict with keys: method (heuristic), sentiment, toxicity_score, spam_score, language, char_count, word_count, cost_usd
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "classify_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes |