Skip to main content
Glama
koyourmoon

Perspective API Alternative (Toxicity Detection)

Analyze toxicity

analyze_toxicity
Read-only

Score English text for toxicity, severe toxicity, insults, profanity, threats, and identity attacks (0-1) to moderate content or filter LLM output.

Instructions

Score English text for toxicity, severe toxicity, insults, profanity, threats and identity attacks (0-1 probabilities, same attributes as Google Perspective API). Use it to moderate user-generated content, filter LLM output, or triage comments before an agent posts them. Pass up to 100 texts at once. Read-only: it does not store or publish text. Each call is billed to your Apify account ($0.50 for 1,000 text units). The first call after an idle period can take 10 to 30 seconds. English only: non-English text gets a warning field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textsYesTexts to score (English). One item per comment or message.
thresholdNoTOXICITY score at or above which a text is marked flagged.
attributesNoAttributes to return. Defaults to all six.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, but the description adds substantial operational context: read-only with no text storage or publication, Apify billing at $0.50 per 1,000 text units, a 10-30 second cold-start latency, a 100-text batch limit, and an English-only warning field for non-English text. These are exactly the behavioral traits an agent needs beyond the safety annotations.

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

Conciseness5/5

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

The description is front-loaded with purpose and use cases, then moves through batch size, read-only behavior, billing, latency, and language limits. Every sentence supplies operational information an agent needs, with no filler.

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

Completeness5/5

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

For a 3-parameter scoring tool with no output schema, the description covers the output scale, the attributes scored, usage scenarios, batch limits, read-only behavior, cost, latency, and the English-only warning field. An agent has enough context to invoke it correctly without additional documentation.

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%, so the schema already documents texts, threshold, and attributes. The description repeats the 100-text batch limit and English-only constraint from the schema, adding little parameter meaning beyond the structured fields; threshold behavior is left entirely to the schema.

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 a specific verb ('Score') and resource ('English text') and enumerates the exact outputs: toxicity, severe toxicity, insults, profanity, threats, and identity attacks. It also states the output scale (0-1 probabilities) and names the reference API, so an agent knows precisely what the tool produces.

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?

It gives concrete use cases—moderating user-generated content, filtering LLM output, or triaging comments before an agent posts them—so the agent knows when the tool is appropriate. It does not state when not to use it or name alternatives, but there are no sibling tools, so this is clear context without exclusions.

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

Deploy Server

Other Tools