Skip to main content
Glama

Tree

redctx_tree
Read-onlyIdempotent

Display a directory hierarchy as an indented tree with redacted names and @p_ IDs for a quick structural overview without exposing sensitive filenames.

Instructions

Show the directory hierarchy under path as an indented tree, one line per entry: @p_<id> <redacted name>, with / after directories. Use it for a quick structural overview; use redctx_list when you need entry types, sizes and full redacted paths, and redctx_search or redctx_retrieve to find content. Policy-excluded, protected (config, term files, .env*, keys) and symlinked entries are omitted. Carry the @p_<id> references into other tools instead of raw names; on a large root, lower max_depth or start from a subdirectory to stay under the traversal limit.

Input Schema

NameRequiredDescriptionDefault
pathNoDirectory to show: a root-relative path or an `@p_<id>` reference. Default `.` (the root). Paths outside the root are refused; a file shows just its own entry..
max_depthNoLevels below `path` to show; 0 shows only `path` itself. Default 3.

Output Schema

NameRequiredDescriptionDefault
textYesThe tool output, identical to the text content block and already redacted: sensitive values appear as deterministic `[CATEGORY_<hex>]` placeholders (forms declared as aliases of one entity share its hex and add a form suffix, `[CATEGORY_<hex>.<form>]`) and files as `@p_<id>` references. When the result has `isError: true`, this is a fixed error message instead, such as a limit error or the notice that context access is blocked until the operator repairs the local redaction config.
receiptYesRedaction statistics for this call only; never contains original values.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.10.0
    • addedInput schema / properties / max_depth / description
      Added value: +"Levels below `path` to show; 0 shows only `path` itself. Default 3."
    • changedInput schema / properties / path / description
      Previous value: -"Path or @p_<id> reference."New value: +"Directory to show: a root-relative path or an `@p_<id>` reference. Default `.` (the root). Paths outside the root are refused; a file shows just its own entry."
    • addedOutput schema / description
      Added value: +"Structured copy of every tool result: the output text plus a receipt of what redaction did."
    • addedOutput schema / properties / receipt / description
      Added value: +"Redaction statistics for this call only; never contains original values."
    • addedOutput schema / properties / receipt / properties / counts_by_category / description
      Added value: +"Placeholders substituted while producing this result (content and paths), keyed by category such as `PERSON`, `EMAIL` or `SECRET`; categories with none are omitted."
    • addedOutput schema / properties / receipt / properties / detector_profile / description
      Added value: +"Active built-in detector profile: `default`, or `extended`, which adds more identifier types and prompt-injection markers."
    • addedOutput schema / properties / receipt / properties / detectors
      Added value: +{
      +  "description": "Present only when the server runs additional local detectors: one entry per detector, in load order.",
      +  "items": {
      +    "properties": {
      +      "name": {
      +        "description": "Detector name.",
      +        "type": "string"
      +      },
      +      "nominated": {
      +        "description": "Distinct values this detector nominated during the call; every occurrence of each is redacted.",
      +        "type": "integer"
      +      },
      +      "positional": {
      +        "description": "Nominated spans redacted only at their own position, because they were too long or exceeded the per-text value budget.",
      +        "type": "integer"
      +      },
      +      "version": {
      +        "description": "Detector version string.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "version",
      +      "nominated",
      +      "positional"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / text / description
      Added value: +"The tool output, identical to the text content block and already redacted: sensitive values appear as deterministic `[CATEGORY_<hex>]` placeholders (forms declared as aliases of one entity share its hex and add a form suffix, `[CATEGORY_<hex>.<form>]`) and files as `@p_<id>` references. When the result has `isError: true`, this is a fixed error message instead, such as a limit error or the notice that context access is blocked until the operator repairs the local redaction config."
  2. First observedv0.4.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, but the description adds substantive behavior beyond them: policy-excluded, protected (config, term files, `.env*`, keys) and symlinked entries are omitted, and a traversal limit exists on large roots. It also tells the agent to propagate `@p_<id>` references rather than raw names, which is a non-obvious workflow requirement.

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?

Purpose is front-loaded and every sentence carries real information; the usage routing follows immediately. It is dense, however, packing omissions, reference-passing and traversal advice into one long paragraph without visual separation, which slightly hurts scanability.

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

Completeness5/5

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

Covers purpose, output format, sibling routing, omissions and traversal constraints — everything needed to call this correctly. Return values are additionally backed by an output schema, so nothing material is missing.

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 and the schema already documents both parameters fully (including that paths outside the root are refused). The description adds operational guidance the schema lacks — that a large root should be handled by lowering `max_depth` or starting from a subdirectory to stay under the traversal limit.

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 ("Show the directory hierarchy under `path`") plus the exact output shape ("indented tree, one line per entry: `@p_<id> <redacted name>`, with `/` after directories"). It explicitly contrasts itself with siblings like `redctx_list`, so an agent can select it without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ("quick structural overview") and names the alternatives with the condition that selects each: `redctx_list` for entry types/sizes/full paths, `redctx_search`/`redctx_retrieve` for content. Nothing is left to inference.

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