Stat
redctx_statReturns metadata for a file or directory—redacted path, type, size in bytes, and line count—so agents can gauge size before reading lines or fetch an opaque id.
Instructions
Return metadata for one file or directory as key: value lines: id (@p_<id>), path (redacted), type (file or directory), size_bytes, and lines for text files. Use it to check a file's size or line count before choosing a redctx_read line range, or to get the opaque id of a known path; use redctx_list for many entries at once. Excluded and protected paths are refused.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File or directory: an `@p_<id>` reference or a root-relative path. |
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. |