Skip to main content
Glama

opnsense_search_dns_queries

Read-only

Search recent DNS queries logged by Unbound, filter by domain, client, or blocklist, and see blocked lookups to investigate unusual client activity or blocklist hits.

Instructions

Search recent DNS lookups seen by the Unbound resolver, including which client asked and whether the answer was blocked.

This requires Unbound's reporting to be enabled in Services -> Unbound DNS -> Reporting; without it the resolver answers queries but records nothing and this tool returns an empty result even on a busy network.

Pair this with the firewall log when a client behaves oddly: a device resolving domains it should not, or a blocklist hit the user did not expect, both show up here and in neither the rule set nor the state table.

Args: params (DnsQueriesInput): Validated input containing: - search (str): Filter on domain, client or blocklist (default: "") - blocked_only (bool): Only blocked queries (default: False) - limit (int): Max records, 1-200 (default: 25) - offset (int): Records 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, "queries": [ {"time": str, "client": str, "type": str, "domain": str, "action": str, "blocklist": str, "rcode": str} ] }

Examples: - Use when: "What did this device look up?" -> search="192.168.30.57" - Use when: "Is anything hitting the blocklist?" -> blocked_only=True

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Beyond the readOnlyHint annotation, the description discloses a critical behavioral caveat: without Unbound's reporting enabled, the tool returns an empty result even on a busy network. It also details the return schema and that 'blocked_only' filters for blocked queries, adding context beyond the annotations.

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-structured with sections for purpose, prerequisite, usage pairing, args, return schema, and examples. Every sentence adds value, and the length is justified by the tool's complexity and nested parameters. It is front-loaded with the purpose and critical prerequisite.

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?

For a search tool with nested parameters and a rich return schema, the description is complete: it covers prerequisites, parameters, output structure, and examples. The explicit return schema compensates for the absence of a structured output schema in the definition, making the tool fully self-documenting.

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?

The description lists all parameters with types and defaults, and adds practical examples for 'search' and 'blocked_only' that illustrate their intended use. While the nested schema already contains descriptions, the description's examples provide actionable semantics beyond the schema, especially given the top-level 'params' object itself lacks a description.

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: 'Search recent DNS lookups seen by the Unbound resolver, including which client asked and whether the answer was blocked.' This immediately distinguishes the tool from siblings like opnsense_get_dns_overview by focusing on query-level search rather than an overview.

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 use cases ('Use when: What did this device look up?', 'Is anything hitting the blocklist?') and a prerequisite (Unbound reporting must be enabled). It also suggests pairing with firewall logs for behavioral investigation. However, it does not explicitly mention when to prefer an alternative sibling tool.

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