Inject Vault Documents
vault_injectInject relevant vault documents into conversation context with token-budget enforcement. Documents are ranked by relevance and priority, then packed to fit within the cap.
Instructions
Load ranked vault documents into conversation context with token-budget enforcement.
Documents are ranked by FTS5 relevance (when query is provided) and priority weight, then packed greedily until the effective token cap is reached.
Args: vault_name: Vault name or ID. query: Optional FTS5 search query to rank documents by relevance. max_tokens: Hard token budget. Overrides vault DB cap. Effective cap = max_tokens * safety_factor. cap_behavior: 'best_effort' (inject as many docs as fit) or 'strict' (error if any doc exceeds cap). session_token: Optional opaque string used as per-session cache key. max_single_doc_tokens: Truncate individual documents to this many tokens. 0 = no per-doc limit. safety_factor: Fraction of max_tokens to use as effective cap (default 0.60 = 60%).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| max_tokens | No | ||
| vault_name | Yes | ||
| cap_behavior | No | best_effort | |
| safety_factor | No | ||
| session_token | No | ||
| max_single_doc_tokens | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |