Skip to main content
Glama
lucamarien

OPNsense MCP Server

by lucamarien

opn_haproxy_add

Create a new HAProxy resource such as frontend, backend, server, ACL, or health check for OPNsense. Specify config fields; changes apply after validation and reconfigure.

Instructions

Create a new HAProxy resource.

Use this to add frontends, backends, servers, actions, ACLs, health checks, error files, resolvers, or mailers.

The config dict contains field name-value pairs. Only specify fields you want to set — the API fills in defaults for omitted fields.

Health check example:

  • config={"name": "hc_web", "type": "http", "interval": "5000", "checkport": "8080", "http_method": "get", "http_uri": "/", "http_version": "http11"}

  • For apps returning non-2xx (e.g. 401 behind auth), add: "http_expressionEnabled": "1", "http_expression": "rstatus", "http_value": "^[2-4][0-9]{2}$"

  • After creating, link to a backend with opn_haproxy_update: config={"healthCheck": ""}

IPv6 examples:

  • Frontend bind: config={"name": "web-v6", "bind": "[::]:443,0.0.0.0:443", "mode": "http", "ssl_enabled": "1", "defaultBackend": ""}

  • Server address: config={"name": "srv1", "address": "2001:db8::1", "port": "8080"}

  • Backend resolvePrefer: config={"name": "pool1", "mode": "http", "algorithm": "roundrobin", "resolvePrefer": "ipv6"}

NOTE: Changes are NOT applied until you call opn_reconfigure_haproxy. Call opn_haproxy_configtest first to validate the configuration.

Returns: dict with 'result' (str) and 'uuid' (str) of the new resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_typeYes
configYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses that changes are not applied until opn_reconfigure_haproxy, recommends testing first, and explains that omitted config fields get defaults. Return format is specified. This is sufficient for a creation 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 well-structured with a clear purpose, examples, and notes. It is relatively long but each section adds value. Could be slightly trimmed without losing essential info.

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

Completeness5/5

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

The description covers the tool's purpose, parameter usage, example configurations, post-creation steps, and return value. Given the complexity of the tool (creating multiple resource types), it is complete and informative.

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

Parameters4/5

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

Schema coverage is 0%, but the description adds significant value by explaining the config dict usage, providing detailed examples for health checks and IPv6 setups, and listing example fields. However, it does not enumerate valid resource_type values.

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

Purpose5/5

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

The description explicitly states 'Create a new HAProxy resource' and lists the specific resource types (frontends, backends, servers, etc.), clearly distinguishing the tool from siblings like opn_haproxy_update.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool, including examples and a note about calling opn_haproxy_configtest before reconfigure. It mentions opn_haproxy_update as an alternative but does not explicitly state when not to use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lucamarien/opnsense-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server