opnsense_fw_apply
Apply pending firewall configuration changes on OPNsense to activate queued rules and settings without reboot.
Instructions
Apply pending firewall configuration changes
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/firewall.ts:409-412 (handler)Handler case for 'opnsense_fw_apply' — executes the apply by POSTing to /firewall/filter/apply endpoint on the OPNsense API and returns the result.
case "opnsense_fw_apply": { const result = await client.post("/firewall/filter/apply"); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } - src/tools/firewall.ts:219-222 (schema)Tool definition/schema for 'opnsense_fw_apply' — declares name, description, and an empty inputSchema (no parameters required).
{ name: "opnsense_fw_apply", description: "Apply pending firewall configuration changes", inputSchema: { type: "object" as const, properties: {} }, - src/index.ts:27-27 (registration)Imports firewallToolDefinitions and handleFirewallTool from src/tools/firewall.js.
import { firewallToolDefinitions, handleFirewallTool } from './tools/firewall.js'; - src/index.ts:60-60 (registration)Registers handleFirewallTool as the handler for all firewall tools listed in firewallToolDefinitions, including 'opnsense_fw_apply'.
for (const def of firewallToolDefinitions) toolHandlers.set(def.name, handleFirewallTool);