Skip to main content
Glama

get_stats

Retrieve Pi-hole summary statistics, including total and blocked queries, block percentage, unique domains, and clients. Query any time range with Unix timestamps.

Instructions

Summary statistics (total/blocked queries, percentage, unique domains, clients).

Pass from_ts and until_ts (Unix timestamps) to query the long-term database for any range.

Input Schema

NameRequiredDescriptionDefault
from_tsNo
until_tsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.1.0
    • addedInput schema / properties / from_ts
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / until_ts
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that supplying timestamps switches the source to the long-term database, but says nothing about read-only nature, permissions, rate limits, or what happens when the range is omitted.

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

Conciseness4/5

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

Two tightly scoped sentences, front-loaded with what the tool returns before the parameter instruction. No filler; the stray blank line is cosmetic only.

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?

An output schema exists, so return values need no explanation, and the description lists the headline metrics plus when the long-term DB is engaged. The remaining gap is the absence of any routing against the many similar stats siblings.

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?

Schema coverage is 0%, so the description must compensate, and it does: it identifies both params as Unix timestamps forming a query range. It still doesn't clarify null/default behavior or invalid-range handling, but it adds substantial meaning beyond the bare integer/null schema.

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 clear verb+resource and enumerates the metrics returned (total/blocked queries, percentage, unique domains, clients). However, it offers no differentiation from stats-like siblings such as get_metrics, get_query_types, or get_database_info, so an agent must guess which aggregate to use.

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?

The second sentence implies a usage contract: pass from_ts/until_ts to query the long-term database over a range, and by omission that no timestamps yields a current/default view. It names no alternatives and states no when-not conditions, so guidance is only implied.

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