Skip to main content
Glama
itunified-io

mcp-opnsense

by itunified-io

opnsense_fw_list_aliases

Lists all OPNsense firewall aliases including host groups, networks, ports, and URLs for inventory or configuration management.

Instructions

List all firewall aliases (host groups, networks, ports, URLs)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for opnsense_fw_list_aliases — calls OPNsense API GET /firewall/alias/searchItem and returns the raw JSON result.
    case "opnsense_fw_list_aliases": {
      const result = await client.get("/firewall/alias/searchItem");
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • Tool definition registration for opnsense_fw_list_aliases — declares name, description, and empty inputSchema in the firewallToolDefinitions array.
      name: "opnsense_fw_list_aliases",
      description: "List all firewall aliases (host groups, networks, ports, URLs)",
      inputSchema: { type: "object" as const, properties: {} },
    },
  • src/index.ts:60-60 (registration)
    Registers the firewall tool handler into the toolHandlers map. Maps all firewall tool names (including opnsense_fw_list_aliases) to the handleFirewallTool function.
    for (const def of firewallToolDefinitions) toolHandlers.set(def.name, handleFirewallTool);
  • OPNsenseClient.get method — used by the handler to make the GET request to /firewall/alias/searchItem.
    async get<T>(path: string): Promise<T> {
      try {
        const response = await this.http.get<T>(path);
        return response.data;
      } catch (error: unknown) {
        throw extractError(error, `GET ${path}`);
      }
    }
  • Shared validation schemas (ProtocolSchema, FirewallActionSchema, DirectionSchema) used elsewhere in the firewall module but not directly needed for list_aliases.
    export const ProtocolSchema = z.enum(["TCP", "UDP", "ICMP", "any"]);
    
    export const FirewallActionSchema = z.enum(["pass", "block", "reject"]);
    
    export const DirectionSchema = z.enum(["in", "out"]);
    
    export const ServiceActionSchema = z.enum(["start", "stop", "restart"]);
Behavior3/5

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

No annotations provided, so description carries full burden. It indicates a non-destructive read operation but provides no additional behavioral details such as authentication or rate limits.

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

Conciseness5/5

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

Single sentence, 12 words, perfectly concise and front-loaded with the purpose. No wasted words.

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

Completeness4/5

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

Adequate for a simple list tool with no parameters and no output schema. Includes alias types but could mention return format briefly.

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?

Input schema has no parameters, and schema description coverage is 100%. The description adds value by specifying alias types, going beyond the empty schema. Baseline for 0 params is 4.

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?

Clearly states the verb 'List' and resource 'firewall aliases' with examples of types (host groups, networks, ports, URLs), distinguishing it from sibling tools like opnsense_fw_manage_alias and opnsense_fw_list_rules.

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?

No explicit when-to-use or alternative guidance. Only implied by the description that it lists aliases, but lacks context for when to use instead of other list tools.

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/itunified-io/mcp-opnsense'

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