Skip to main content
Glama
crunchtools

io.github.crunchtools/airlock

Official
by crunchtools

Dir Tool

dir_tool

List a directory across all security layers to detect shadowed modules and risky files before running code from extracted, cloned, or downloaded sources.

Instructions

List a directory through all three layers.

File names are judged like any other text. A directory where a .py file shadows a Python standard-library module (struct.py, os.py) is flagged: running Python there would import the attacker's module. Use this before running code in anything extracted, cloned or downloaded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDirectory to list
trentina_modeNoblock, flag, or {"redact": "<what you need>"}

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.43.1
    • changedInput schema / properties / trentina_mode / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "``trentina_mode: {\"redact\": \"<question>\"}``: extract, instead of deliver.",
      +    "properties": {
      +      "redact": {
      +        "description": "What to extract",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "redact"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / trentina_mode / description
      Previous value: -"block, redact or flag; see the server instructions"New value: +"block, flag, or {\"redact\": \"<what you need>\"}"
    • removedInput schema / properties / trentina_prompt
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "What to extract, for redact"
      -}
  2. Addedv0.37.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It adds useful threat-model context (filename shadowing, Python module spoofing) but never explains the tool's own operational modes: the schema's trentina_mode 'block, flag, or redact' behavior is not described at all, and read-only vs mutating behavior is only implied.

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?

Three short sentences, front-loaded with the action and then the rationale. 'Through all three layers' is dead weight and mildly confusing, but the rest is efficient and the struct.py/os.py example earns its place.

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?

An output schema exists, so return values need not be explained, and the threat rationale is present. But the unexplained 'three layers' and the wholly undocumented trentina_mode semantics leave real gaps for a security-oriented tool with zero annotations.

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% with only two parameters, so the baseline is 3. The description adds no parameter-level detail — in particular it does not clarify what 'block' vs 'flag' vs 'redact' actually do, leaving the schema's terse enum description to carry that load.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a concrete verb and resource ('List a directory') and differentiates itself from siblings like read_tool/fetch_tool by being a directory-level scan. However, the phrase 'through all three layers' is unexplained jargon that obscures what is actually being listed or analyzed.

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 a clear triggering condition: 'Use this before running code in anything extracted, cloned or downloaded.' That is an explicit when-to-use. It stops short of naming alternatives (e.g., when read_tool or fetch_tool would be preferred instead), so it is not a 5.

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