List
redctx_listList 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
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Directory to list: a root-relative path or an `@p_<id>` reference. Default `.` (the root). A file returns just its own entry. | . |
| max_depth | No | With `recursive`, levels below `path` to descend; 0 lists only `path`. Default unlimited. Ignored when `recursive` is false. | |
| recursive | No | List every entry in the subtree, starting with `path` itself, instead of only its immediate children. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | 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. | |
| receipt | Yes | Redaction statistics for this call only; never contains original values. |