Skip to main content
Glama

wireguard_add_peer

Add a WireGuard peer to a MikroTik interface by defining allowed addresses, remote public key, and optional endpoint or client config.

Instructions

Add a WireGuard peer. This server never generates keys; all values come from the user.

allowed_address (REQUIRED, ask the user): addresses this peer uses/routes, comma-separated, '/prefix' or dotted mask. E.g. '10.10.10.2/32' (phone/laptop) or '10.10.10.2/32, 192.168.50.0 255.255.255.0' (remote site + its LAN). Validated: format, overlap with other peers, inside the tunnel subnet, not the router's own IP. public_key: the REMOTE peer's public key (shown in its WireGuard app / remote router). Leave empty to have the user type it in a local popup on apply. Checked: format, not this router's own key, not already used on this interface. use_preshared_key: on apply the preshared key is entered in a local popup (or via preshared_key). Never ask the user to paste it in chat. endpoint: 'host:port' of the remote side for site-to-site. Omit for roaming clients. write_client_config: also save a .conf for the remote device. Requires (ask the user): client_allowed_ips: '0.0.0.0/0' for full tunnel, or specific subnets (split tunnel); server_endpoint: public IP/hostname (and :port) the client connects to. On apply the user may enter the client's private key in a popup to get a complete config + QR; it is checked against public_key. If left empty, a template is saved. client_dns: optional DNS server IP(s) for the client config.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNorouter
siteNo
commentNo
dry_runNo
endpointNo
interfaceYes
client_dnsNo
public_keyNo
preshared_keyNo
allowed_addressYes
server_endpointNo
rollback_minutesNo
use_preshared_keyNo
client_allowed_ipsNo
write_client_configNo
persistent_keepaliveNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full behavioral burden and does well: it discloses that keys are never generated server-side, that preshared keys are entered via a local popup (not chat), that public_key is validated against the router's own key and existing peers, and that empty public_key yields a template. It does not explain dry_run semantics, rollback_minutes behavior, or the apply/confirm/rollback workflow from the sibling tools, which are significant for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action and then uses a clear field-by-field list that is easy to scan. It is somewhat long, but every line maps to a parameter or a behavioral rule, so it largely earns its space. Slightly dense but well organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values needn't be explained. Still, for a 16-parameter mutation tool with no annotations and 0% schema coverage, the description leaves several parameters (dry_run, rollback_minutes, name, site, comment, persistent_keepalive) unexplained. The core peer-creation flow is covered, but the gaps on operational parameters reduce completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and there are 16 parameters, so the description must compensate. It documents handful of key parameters (allowed_address, public_key, use_preshared_key, endpoint, write_client_config and its dependents, client_dns) with real semantics and formats. However, it ignores name, site, comment, dry_run, preshared_key, persistent_keepalive, rollback_minutes, and server_endpoint, leaving many undocumented despite the low coverage. Partial compensation warrants a middle score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (add) and resource (WireGuard peer), clearly distinguishing it from wireguard_update_peer and wireguard_remove_peer. The scope is unambiguous. It doesn't explicitly name siblings, but the verb distinction makes purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to provide each field and gives channel-specific guidance (e.g., 'ask the user', 'Never ask the user to paste it in chat'), which is helpful operational context. However, it never states when to use this tool vs wireguard_update_peer or wireguard_create_interface, nor does it mention prerequisites like an existing interface. Usage is implied rather than scoped.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.