Skip to main content
Glama

get_query_log

Retrieve Pi-hole DNS query logs with optional filters for domain, client, status, type, and time. Use it to troubleshoot DNS issues, audit blocked queries, or monitor client activity.

Instructions

Fetch DNS queries with optional filters (wildcards * supported on text filters).

Filters:

  • length: number of queries (default 100); start: offset for paging

  • from_ts / until_ts: Unix timestamps

  • domain, client_ip, client_name, upstream: exact or wildcard match

  • query_type: e.g. A, AAAA, HTTPS, PTR (unmapped types appear as TYPEnnn or OTHER)

  • status: e.g. GRAVITY, FORWARDED, CACHE, REGEX, DENYLIST

  • reply: e.g. IP, NXDOMAIN, NODATA, CNAME

  • dnssec: e.g. SECURE, INSECURE, BOGUS

  • cursor: cursor value from a previous response

  • disk: true searches the long-term database instead of in-memory queries Valid filter values come from get_query_suggestions.

Input Schema

NameRequiredDescriptionDefault
diskNo
replyNo
startNo
cursorNo
dnssecNo
domainNo
lengthNo
statusNo
from_tsNo
until_tsNo
upstreamNo
client_ipNo
query_typeNo
client_nameNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.1.0
    • addedInput schema / properties / client_name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • changedInput schema / properties / cursor / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / disk
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • addedInput schema / properties / dnssec
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / query_type
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / reply
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / start
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / status
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the default row count (100), wildcard support on text filters, the in-memory vs long-term-database switch, cursor paging, and how unmapped query types are labeled. It omits read-only framing and any permission/auth notes, keeping it from a 5.

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 core action and the wildcard caveat are front-loaded in the first sentence, followed by a tight bullet list where each line maps to a distinct parameter or concept. For a 14-parameter tool, no line is wasted.

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?

For a 14-parameter read tool with an output schema present and zero annotation coverage, the description covers filtering, paging, and data-source selection thoroughly. The remaining gap is the absence of any explicit read-only/safety statement, which no other structured field supplies.

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

Parameters5/5

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

Schema description coverage is 0% across 14 parameters, and the description compensates by documenting every one: length/start, from_ts/until_ts, domain/client_ip/client_name/upstream, query_type, status, reply, dnssec, cursor, and disk. It adds concrete example values not present as enums in the schema, which is exactly the value a description should provide here.

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?

States a specific verb and resource ('Fetch DNS queries') with the scope 'with optional filters', so the agent knows exactly what it retrieves. It does not explicitly distinguish itself from the log-oriented siblings (get_tail_log, get_history), so it falls short of a full 5.

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?

Provides clear decision context: 'disk: true searches the long-term database instead of in-memory queries' and 'Valid filter values come from get_query_suggestions.' However, it never states when to prefer this over get_tail_log or get_history, and gives no exclusions, so no explicit alternative routing.

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