capture_file
Ingest a file's contents into an ephemeral search index for hybrid retrieval. Specify a file path and optional label, metrics, or byte limit to get a JSON summary.
Instructions
Reads a file or log output from disk and ingests it into the ephemeral
search index. Returns a compact versioned JSON summary and preserves
optional named metrics in structured_metrics.
Validate the intended file path before calling: resolve symlinks when path
identity matters, confirm the file belongs to the expected workspace, and
use an explicit bounded max_bytes for large or untrusted files. Capture
limits control output handling; they do not validate filesystem intent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | ||
| file_path | Yes | ||
| max_bytes | No | ||
| content_type | No | auto | |
| structured_metrics | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |