Skip to main content
Glama

classify_input

Check if user input is safe and on-topic before AI processing. Blocks prompt injection, jailbreaks, and off-topic requests to protect LLM actions.

Instructions

Check whether user input is safe and in-scope before an AI system processes it. Detects prompt injection, jailbreak attempts, instruction overrides, and off-topic requests. Use this to validate untrusted user text before passing it to an LLM or executing a tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe untrusted user input to classify
presetNoWhich guard domain to use. Default: general knowledge assistant
Behavior3/5

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

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It explains the tool checks for attack types (prompt injection, jailbreak, etc.) and off-topic requests, but does not specify what output format or classification labels are returned, nor whether it modifies state or requires special permissions. This leaves behavioral gaps.

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 two sentences long, front-loaded with the primary purpose, and wastes no words. It efficiently communicates the tool's function and when to use it.

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

Completeness3/5

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

For a classification tool with no output schema and no sibling tools, the description covers the input purpose and usage context. However, it lacks details on return values, classification categories, and edge cases, which reduces completeness for an agent needing to interpret results.

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 both parameters. The description does not add additional semantics beyond what the schema provides (e.g., it does not explain the 'preset' enum options or their implications), so a baseline of 3 is appropriate.

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 clearly states that this tool checks user input for safety and scope before AI processing, specifically detecting prompt injection, jailbreak attempts, instruction overrides, and off-topic requests. This provides a precise verb-resource combination and distinguishes its purpose as a safety validator.

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 explicitly advises using this tool 'before passing it to an LLM or executing a tool,' and notes it validates 'untrusted user text.' While there are no sibling tools or explicit when-not-to alternatives provided, the guidance is clear and actionable for its intended use case.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/swnotmetal/Project-Koma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server