Skip to main content
Glama

List

redctx_list
Read-onlyIdempotent

List directory entries with opaque IDs, sizes, and redacted paths for coding agents. Choose flat or recursive output to gather context IDs without exposing sensitive filenames.

Instructions

List directory entries as tab-separated lines @p_<id> file|dir <size bytes or -> <redacted root-relative path>: immediate children (directories first) by default, or the whole subtree with recursive. Use it to collect opaque ids, sizes and full paths of specific entries; use redctx_tree for an indented overview of the hierarchy. Policy-excluded, protected and symlinked entries are omitted and paths are redacted, so pass the returned @p_<id> to redctx_read, redctx_stat or redctx_bundle rather than retyping names.

Input Schema

NameRequiredDescriptionDefault
pathNoDirectory to list: a root-relative path or an `@p_<id>` reference. Default `.` (the root). A file returns just its own entry..
max_depthNoWith `recursive`, levels below `path` to descend; 0 lists only `path`. Default unlimited. Ignored when `recursive` is false.
recursiveNoList every entry in the subtree, starting with `path` itself, instead of only its immediate children. Default false.

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. Changed9 schema fields changedv0.10.0
    • addedInput schema / properties / max_depth / description
      Added value: +"With `recursive`, levels below `path` to descend; 0 lists only `path`. Default unlimited. Ignored when `recursive` is false."
    • changedInput schema / properties / path / description
      Previous value: -"Path or @p_<id> reference."New value: +"Directory to list: a root-relative path or an `@p_<id>` reference. Default `.` (the root). A file returns just its own entry."
    • addedInput schema / properties / recursive / description
      Added value: +"List every entry in the subtree, starting with `path` itself, instead of only its immediate children. Default false."
    • 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.9/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description goes well beyond them by disclosing non-obvious behavior: policy-excluded, protected and symlinked entries are silently omitted, paths are redacted, and entry ordering is directories-first. Those omissions are exactly the kind of surprise an agent would otherwise misinterpret as 'not present'.

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 output format is front-loaded in sentence one, then default scope, then the sibling alternative and policy caveats. It is dense (one long opening sentence) but every clause carries information an agent needs for correct invocation; nothing is padding.

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?

An output schema exists, so return values need not be explained, yet the description still documents the line format, id semantics and redaction. Combined with the explicit sibling routing and id-reuse guidance, an agent has everything required to call this and to chain it correctly.

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 description earns an extra point by restating the interaction between `recursive` and scope ('immediate children (directories first) by default, or the whole subtree with `recursive`') and adding the ordering guarantee that the schema does not mention. It does not add much on `max_depth` beyond what the schema already documents.

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 ('List directory entries') and immediately pins down the output shape and default scope. It explicitly names the sibling `redctx_tree` as the thing it is not, so an agent can discriminate between the two without opening either 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 ('collect opaque ids, sizes and full paths of specific entries') versus the named alternative ('use `redctx_tree` for an indented overview'), and adds a downstream-usage rule: pass the returned `@p_<id>` to `redctx_read`, `redctx_stat` or `redctx_bundle` rather than retyping names.

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