You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**[PolicyLayer](https://policylayer.com/)**: Argument-path predicate DSL shape (`args.domain in [...]` with `eq`/`in`/`regex`/`contains`/`exists`/...) inspired the per-tool approval rule schema (#966).
315
316
316
317
## 👥 Contributors
317
318
@@ -360,6 +361,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
360
361
-**[@drseanwing](https://github.com/drseanwing)** — Progress emission via FastMCP `Context` in long-running tools (#1124); tool-discovery / categorized-search docs (#1123).
361
362
-**[@fnordpig](https://github.com/fnordpig)** — Config subentry support (#1393) and Assist pipeline management tool (#1392).
362
363
-**[@paul43210](https://github.com/paul43210)** — `array_patch` mode in `ha_manage_addon` for atomic GET-modify-POST (#1063).
364
+
-**[@L1AD](https://github.com/L1AD)** — Filed #966 proposing per-tool approval gating; pointed to PolicyLayer's MCP-security work as prior art that inspired the predicate DSL shape.
|`enable_tool_search`| Replace full tool catalog with search-based discovery (~46K → ~5K tokens). ⚠️ Do NOT enable for Claude Sonnet/Opus — their built-in tool search conflicts with ha-mcp's. Disable one or the other. |`false`|
18
+
|`enable_per_tool_approval`*(beta)*| Gate high-stakes tool calls (lock/alarm control, automation writes, etc.) behind user approval. Guarded calls return an approval URL the user clicks to allow. Per-tool rules with optional argument predicates are configured in the Policies tab of the web UI. |`false`|
Copy file name to clipboardExpand all lines: homeassistant-addon/DOCS.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -272,13 +272,33 @@ Replaces the full tool catalog (~88 tools, ~46K tokens) with search-based discov
272
272
273
273
Requires add-on restart to take effect.
274
274
275
+
### enable_per_tool_approval
276
+
277
+
**Default:** `false`
278
+
279
+
Gates high-stakes tool calls (lock/alarm control, automation writes, etc.) behind explicit user approval. When a guarded tool is called, the agent receives an approval URL and the call is held until the user clicks **Approve** in the **Policies** tab of the web UI. Per-tool rules — with optional argument predicates — are configured from the same Policies tab.
280
+
281
+
**When to enable:**
282
+
- Shared installations where you want a human in the loop for destructive or security-relevant operations
283
+
- Locks, alarms, and other entities where an LLM mistake has real-world consequences
284
+
- Whenever you want a hard audit trail of which tool calls were explicitly allowed
285
+
286
+
**When to leave disabled (default):**
287
+
- Single-user setups where you're comfortable with the LLM acting autonomously
288
+
- You haven't configured any policy rules yet (with no rules, the toggle has no effect — but the runtime cost is small either way)
289
+
290
+
The policy engine is in beta. Off by default. Requires add-on restart to take effect.
291
+
275
292
**Example Configuration:**
276
293
277
294
```yaml
278
-
backup_hint: normal
279
-
secret_path: "" # Leave empty for auto-generation
295
+
enable_per_tool_approval: true
280
296
```
281
297
298
+
Per-tool rules (including argument predicates like `args.domain in ['lock', 'alarm_control_panel']`) are configured from the **Policies** tab in the web UI, not from `config.yaml`.
299
+
300
+
*Inspired by [PolicyLayer](https://policylayer.com/)'s policy DSL shape, originally proposed in [#966](https://github.com/homeassistant-ai/ha-mcp/issues/966) by [@L1AD](https://github.com/L1AD).*
0 commit comments