toxicity_scan
Scan text for toxic language, hate speech, bias/stereotype framing, violence, sexual and self-harm content. Lexical + structural pattern matching (identity term + predicate), not a semantic classifier — returns per-category risk plus the named rules that fired, so every finding can be checked. Languages: English for every category; French for insults, coarse language, direct threats and self-harm intent; anything else reads clean, so clean is not proof of safety. Text is also matched after undoing leetspeak and lookalike letters. Self-harm is critical only on a first-person intent — a mention ("call 988 if you have suicidal thoughts") is medium. Useful for LLM safety guardrail testing and triage; signal-only, not a calibrated CI gate.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "Ce contrat est conclu avec un partenaire."
},
"name": "toxicity_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to scan | |
| categories | No | Categories to check (default: all) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | No | ||
| results | No | ||
| text_length | No | ||
| overall_risk | No | ||
| categories_checked | No |