Skip to main content
Glama

Analyze Toxicity

analyze_toxicity
Read-onlyIdempotent

Analyze text for toxic content.

Returns scores for 6 categories: toxic, severe_toxic, obscene, threat, insult, identity_hate. Each score is 0.0-1.0. BERT-based classifier with sub-15ms latency on GPU.

Args: text: Text to analyze for toxicity (hate speech, insults, threats).

Returns: dict with keys: - toxic (float 0-1): Overall toxicity score - severe_toxic (float 0-1): Severe toxicity score - obscene (float 0-1): Obscenity score - threat (float 0-1): Threat score - insult (float 0-1): Insult score - identity_hate (float 0-1): Identity-based hate score - is_toxic (bool): Whether text exceeds toxicity threshold

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to analyze for toxicity (hate speech, insults, threats)

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior. The description adds meaningful behavioral details beyond these: the six output categories, score range 0.0-1.0, BERT-based model, sub-15ms latency, and the is_toxic flag indicating threshold exceedance. This substantially enriches the annotation data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized with a summary, score overview, and formal Args/Returns sections, making it easy to scan. It repeats the category names in both the introductory list and the Returns block, introducing minor redundancy, but every section contributes useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Since there is no output schema, the description fully specifies the return dict with keys and value types, including the is_toxic flag. It also covers model behavior and latency. Minor gaps include the undisclosed threshold for is_toxic and lack of edge-case behavior for empty or very long input, though maxLength is in the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the single 'text' parameter is already described in the schema as 'Text to analyze for toxicity (hate speech, insults, threats)'. The description's Args section merely repeats this definition and adds no new constraints, format details, or interpretation beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Analyze text for toxic content', a specific verb and resource, and enumerates six toxicity categories, making its scope precise. This clearly distinguishes it from sibling tools like analyze_sentiment and classify_text_custom, which serve different classification purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description conveys a clear use case: detecting toxic content across specific categories. However, it does not explicitly mention alternatives or state when not to use this tool. The context is evident, but no exclusionary or decision-rule guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.6/5.0
Disambiguation4/5

Most tools map cleanly to distinct capabilities, and the descriptions make the intended use clear. A few adjacent pairs—extract_entities vs link_entities_to_wikidata and detect_pii vs detect_conversational_pii—require careful selection, but they are distinguishable by their stated outputs.

Naming Consistency4/5

Names are uniformly lowercase snake_case and mostly follow a verb_object pattern, such as analyze_*, detect_*, extract_*, summarize_text, and translate_text. A few outliers like aspect_sentiment, fraud_feedback, and knowledge_ingest break the verb-first feel, but the overall pattern remains predictable.

Tool Count3/5

At 22 tools, this is on the heavy side of the borderline range. Each tool has a distinct job, but the mix of core NLP, safety, fraud, health-checking, and knowledge-base management makes the surface feel sprawling rather than tightly scoped.

Completeness3/5

The core NLP coverage is broad: sentiment, toxicity, PII, entities, QA, summarization, translation, and groundedness are all present. However, the knowledge-base tools support ingest/list/query but no delete or update, creating a dead end when documents need correction or removal.

Resources