observe_chat
Scans chat exchanges for secrets, PII, and policy risks; records usage and blocks disallowed prompts before running approved LLM requests.
Instructions
[WRITE][risk=medium] Scan + policy-gate a chat exchange, record it, then run if allowed.
Args: model: Model to run. messages: OpenAI-style [{"role","content"}] messages (contents are scanned). agent / user: Actor attribution recorded in the usage log. block_threshold: Block when risk band >= this. target: Ollama target name from config; omit for the default.
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": {
"model": "<model>",
"messages": "<messages>"
},
"name": "observe_chat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | ||
| agent | No | unknown | |
| model | Yes | ||
| target | No | ||
| messages | Yes | ||
| block_threshold | No | high |