create_wireguard_peer
Creates a WireGuard peer on a pfSense tunnel from a public key, with optional endpoint, port, keepalive, and pre-shared key settings.
Instructions
Create a new WireGuard peer on a tunnel
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": {
"tun": "<tun>",
"publickey": "<publickey>"
},
"name": "create_wireguard_peer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tun | Yes | Parent tunnel name the peer belongs to (e.g. "tun_wg0" — upstream references the tunnel by name, not by array-index id) | |
| port | No | Optional peer endpoint port | |
| descr | No | Optional description | |
| enabled | No | Whether the peer is enabled (default: True; upstream defaults new peers to disabled, so this must be sent to get a working peer) | |
| endpoint | No | Optional peer endpoint hostname or IP | |
| keepalive | No | Optional persistent keepalive interval in seconds | |
| publickey | Yes | WireGuard public key for the peer | |
| presharedkey | No | Optional pre-shared key for additional security | |
| apply_immediately | No | Whether to apply changes immediately |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||