Skip to main content
Glama
crunchtools

io.github.crunchtools/airlock

Official
by crunchtools

Safe Content Tool

safe_content_tool

Sanitize untrusted inline content using three-layer detection to block prompt injection. Fails when injection is detected.

Instructions

Sanitize inline content with all three layers. Fails if injection detected.

Always untrusted — runs L1 + L2 + L3 detection on every call. Uses SHA-256 content hash for blocklist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesRaw text content to sanitize
content_typeNoMIME type — text/plain (default), text/html, or text/markdowntext/plain

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behaviors: every call runs L1+L2+L3 detection, content is always treated as untrusted, it fails on injection, and it uses SHA-256 content hashing for blocklist checks. This is solid, though it could detail what 'sanitize' actually does to the content (e.g., stripping or escaping).

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 four concise sentences with no redundant words. Purpose is front-loaded in the first sentence, followed by essential behavioral facts. Every sentence earns its place.

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?

Given 2 parameters, no annotations, and an existing output schema, the description covers the critical behavioral aspects (untrusted input, detection layers, failure on injection). It does not enumerate the three layers or mention prerequisites, but for a sanitizer tool this is reasonably complete.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds meaning by clarifying that content is always treated as untrusted and undergoes layered detection, which enriches the 'content' parameter. It does not add specifics about content_type beyond the schema, but the overall semantic contribution is above baseline.

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 states a specific action ('Sanitize inline content') with a method ('all three layers', 'L1 + L2 + L3') and a failure condition ('Fails if injection detected'). The verb 'sanitize' clearly distinguishes it from scanning siblings like scan_content_tool and deep_scan_content_tool, making its purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies usage context with 'Always untrusted' — it should be used for untrusted inline content and always runs detection. However, it does not explicitly state when to prefer this tool over siblings (e.g., scan_content_tool for detection-only, quarantine_content_tool for quarantining), leaving the choice to inference.

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