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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "capture_file"
}
}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 |