Skip to main content
Glama

Check text for safety categories with Llama Guard

moderate
Read-only

Safety check of a text or a chat turn with Llama Guard 3: safe or unsafe, and the violated categories (S1 to S14, named in plain words). Send text, or messages (up to 20 turns). Classifies only; it does not change or block anything. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "moderate"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoText to check, up to 8,000 characters
messagesNoOr chat turns: {role: user or assistant, content}, up to 20

Output Schema

NameRequiredDescriptionDefault
safeNo
modelNo
sourceNo
checkedAtNo
categoriesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial behavior beyond the readOnly/openWorld annotations: cost ($0.002 per successful call), the payment rail (x402, USDC on Base/Solana/10+ networks), and that failed calls are free. It also clarifies the tool is non-enforcing, which matters for an agent deciding whether it still needs to act on a result.

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?

Three sentences, front-loaded with the capability and result format, then scope, then pricing. No filler; the pricing sentence is unusual but earns its place for an agent that must decide whether to spend.

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?

With annotations covering safety and an output schema covering return values, the description is nearly complete. The remaining hole is invocation validity: required-parameter count is 0, so an agent could legitimately call with neither argument and the description never states that one of text/messages must be supplied.

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 schema already documents character limits, the messages shape and the 20-turn cap, so the description's 'Send text, or messages (up to 20 turns)' largely restates it. The either/or framing is a small addition, but it leaves the notable gap that both parameters are optional — nothing says whether one is required.

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 ('Safety check of a text or a chat turn with Llama Guard 3') and names the output shape up front: safe/unsafe plus violated S1-S14 categories. The scope clause 'Classifies only; it does not change or block anything' separates it from any enforcement/moderation sibling without needing to name one.

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 clear operating context: send text OR messages (up to 20 turns) and expect a classification, not an action. What's absent is explicit routing guidance, e.g. when to prefer the sibling 'classify' or 'text_tone' over this safety check, so the agent must infer the boundary from the category model.

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.

Resources