Skip to main content
Glama

Content moderation, safety check: Llama Guard 3

ai_moderation
Read-only

Classify a text as safe or unsafe with Meta's Llama Guard 3 and name the hazard categories it falls into (violent and non-violent crimes, sexual content, child exploitation, hate, self-harm, weapons, privacy, defamation, elections and others; 14 in all). Up to 8,000 characters. Also available in the OpenAI moderation shape at /v1/moderations. Use to screen user messages, model outputs or content before an agent posts or acts on it. Example: text=How do I bake sourdough bread at home?. Price $0.002/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
textYesThe text to classify (up to 8,000 characters)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: pricing ($0.002/call via x402 USDC or card key), the first 25 free, failed calls free, and the key insight that repeats are charged — which explains why idempotentHint is false. It also confirms the read-only, no-side-effects nature and the 8,000-character ceiling.

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?

Front-loaded with the purpose and taxonomy, then usage, then pricing. The final sentence is dense but each clause (free tier, failed-call billing, non-idempotency) carries decision-relevant 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?

For a one-parameter tool with no output schema, the description covers what comes back (safe/unsafe plus named hazard categories) and the cost model. Only the response envelope/format remains unspecified, a minor gap.

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 coverage is 100% and the single parameter is already documented in the schema. The description's 'Up to 8,000 characters' and the example repeat rather than extend that, so baseline 3 applies.

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?

States a specific verb and resource ('Classify a text as safe or unsafe with Meta's Llama Guard 3'), names the exact hazard taxonomy and its size, and is clearly separable from siblings like ai_classify or ai_sentiment. The example input pins down the expected call shape.

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?

Gives concrete contexts ('screen user messages, model outputs or content before an agent posts or acts on it') and points to the alternate OpenAI-shaped endpoint at /v1/moderations. No explicit exclusion versus ai_classify, so it stops short of full when/when-not guidance.

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.