Skip to main content
Glama

opnsense_get_alias_contents

Read-onlyIdempotent

Read the live pf table addresses for an OPNsense alias to verify resolved hostnames, URL feeds, and GeoIP sets, helping diagnose unexpected firewall rule behavior.

Instructions

Get the addresses currently loaded in an alias's pf table.

This reads the live table, so it reflects resolved hostnames, downloaded URL table feeds and refreshed GeoIP sets. When a rule using an alias is not behaving as expected, comparing this against the alias configuration is usually the fastest way to find that a feed failed to refresh.

Args: params (AliasContentsInput): Validated input containing: - name (str): Alias name - limit (int): Max entries, 1-200 (default: 25) - offset (int): Entries to skip (default: 0) - response_format (ResponseFormat): 'markdown' or 'json'

Returns: str: Markdown table, or JSON with this schema: { "total": int, "count": int, "offset": int, "has_more": bool, "next_offset": int|null, "alias": str, "entries": [{"ip": str}] }

Error Handling: - Returns a not-loaded message when the alias exists but has no pf table, which happens when no enabled rule references it

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds valuable context beyond that: it explains that the tool reads the live pf table reflecting resolved hostnames, downloaded feeds, and refreshed GeoIP sets, and it documents the specific 'not-loaded' error case when no enabled rule references the alias. This depth of behavioral disclosure is excellent.

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?

The description is well-organized with a clear lead sentence, followed by structured Args, Returns, and Error Handling sections. It is appropriately sized for the tool's complexity, with every part serving a purpose and no unnecessary filler.

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 fully covers what the tool does, when to use it, parameter semantics, return format (including an inline JSON schema), and error handling. It leaves no significant gap for an AI agent to determine correct invocation and interpretation of results.

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?

The input schema already provides comprehensive descriptions for all parameters, including defaults, ranges, and format guidance. The description's Args section repeats this information without adding substantial new meaning, so a baseline score of 3 is appropriate given high schema coverage.

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 opens with a specific verb and resource: 'Get the addresses currently loaded in an alias's pf table.' This clearly states the tool's function and differentiates it from sibling tools like opnsense_search_aliases (searching alias configuration) and opnsense_update_alias_entries (modifying aliases). The live-table qualification further clarifies the scope.

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?

It provides a concrete use case: when a rule using an alias misbehaves, comparing live table contents to alias configuration helps detect failed feed refreshes. This gives clear context for when to use the tool, though it does not explicitly name alternative tools or exclusion scenarios.

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

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