# Tool-call gate (safety MVP)
**Commands**
```bash
cargo run --example tool_gate
# with real GET after ALLOW:
cargo run --example tool_gate_http
```
## Story
1. Host/agent **proposes** tool names (+ optional `params`).
2. `ToolGateExecutor` enforces **allow-list** + **deny-list**.
3. Denied tools **never** run (no network).
4. Allowed tools are audited (`ToolAllowed` / `ToolDenied`).
5. Optional: `enable_http_get(true)` — only tool `http_get` may perform a **GET** (`params.url`), response body truncated.
## What this is / is not
| Last-line gate before side effects | Full LLM HTTP proxy |
| Auditable allow/deny | Content NLP classifier |
| One real read-only tool path | POST/PUT/shell/DB access |
## Library
```rust
use omega_cognitive_kernel::{AuditLog, ToolGateExecutor, Executor};
let mut gate = ToolGateExecutor::new(["http_get".into(), "search_docs".into()])
.deny(["delete_database".into()])
.with_audit(AuditLog::beside_state(path))
.enable_http_get(true) // real GET only for http_get
.fail_closed(true);
gate.execute(&proposed_actions)?;
```
`http_get` rules: `http://` or `https://` only; connect/read timeouts; at most 2 KiB plus one sentinel byte is read for the bounded body preview.
**Deployment boundary:** URL allow-listing and private-network/SSRF policy belong to the host. Do not expose arbitrary user-controlled URLs to `http_get`; front it with an application allow-list or an egress proxy that resolves and filters redirects as well as the initial destination. The gate restricts tool names and schemes, not IP ranges or DNS resolution.
## Roadmap
1. [x] Gate + audit events
2. [x] Real `http_get` after ALLOW
3. [ ] Host service wrapping gate + kernel status
See [PRODUCT.md](./PRODUCT.md), [INTERVENTION_POLICY.md](./INTERVENTION_POLICY.md).