Skip to main content
Glama
itunified-io

mcp-opnsense

by itunified-io

opnsense_diag_log_resolver

Fetch recent Unbound DNS resolver log entries from OPNsense to diagnose and troubleshoot DNS resolution issues.

Instructions

Retrieve recent Unbound DNS resolver log entries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of log entries (1-5000, default 500)

Implementation Reference

  • Handler case for 'opnsense_diag_log_resolver' — parses args via LogQuerySchema, calls GET /diagnostics/log/core/resolver?limit=<limit> API, returns JSON result.
    case "opnsense_diag_log_resolver": {
      const parsed = LogQuerySchema.parse(args);
      const result = await client.get(`/diagnostics/log/core/resolver?limit=${parsed.limit}`);
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • LogQuerySchema used for input validation of the resolver tool (and other log tools). Accepts optional 'limit' (coerced number, 1-5000, default 500).
    const LogQuerySchema = z.object({
      limit: z.coerce.number().int().min(1).max(5000).optional().default(500),
    });
  • Tool definition registration in diagnosticsToolDefinitions array — declares name, description, and inputSchema (with optional limit param) for the ListTools response.
    {
      name: "opnsense_diag_log_resolver",
      description: "Retrieve recent Unbound DNS resolver log entries.",
      inputSchema: {
        type: "object" as const,
        properties: {
          limit: { type: "number", description: "Number of log entries (1-5000, default 500)" },
        },
      },
    },
  • src/index.ts:61-61 (registration)
    Tool handler registration — maps the tool name from diagnosticsToolDefinitions to handleDiagnosticsTool in the toolHandlers Map.
    for (const def of diagnosticsToolDefinitions) toolHandlers.set(def.name, handleDiagnosticsTool);
  • src/index.ts:42-42 (registration)
    All tool definitions array includes diagnosticsToolDefinitions (which contains the resolver tool definition).
    ...diagnosticsToolDefinitions,
Behavior2/5

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

No annotations are provided, so the description must convey behavior. It only says 'retrieve recent... log entries,' omitting details like read-only nature, output format, how 'recent' is defined, or whether authentication is required. Minimal behavioral disclosure.

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, no fluff, appropriately front-loaded. Every word contributes value.

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?

For a simple retrieval tool with one optional parameter and no output schema, the description is passable but lacks details about log content, recency bounds, and differentiation from siblings. Not fully complete given the context.

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 100% and the description adds no extra meaning beyond the schema's explanation of the 'limit' parameter. Baseline 3 is appropriate.

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?

The description clearly states the action 'Retrieve' and the resource 'recent Unbound DNS resolver log entries.' It provides a specific verb and resource, but it does not differentiate from sibling diagnostic log tools such as opnsense_diag_log_system or opnsense_diag_fw_logs.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. There are several other log retrieval tools (e.g., opnsense_diag_fw_logs, opnsense_diag_log_system) and no contextual hints about when the resolver log is appropriate.

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