Skip to main content
Glama

access_log_aggregate

Aggregates access logs into top-k counts for a chosen field over a specified time window to help identify traffic patterns, status-code spikes, or high-volume source IPs.

Instructions

Top-k counts of an access-log field over a time window.

field (UPPERCASE): AUTHORITY, RSP_CODE, RSP_CODE_CLASS, RSP_CODE_DETAILS, SRC_IP, REQ_PATH, METHOD, COUNTRY, ASN, VH_NAME. query: label selector, e.g. {vh_name="ves-io-http-loadbalancer-",rsp_code="429"}. Window: last minutes, or explicit start_time/end_time as YYYY-MM-DDTHH:MM:SSZ (UTC).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "field": "<field>"
    },
    "name": "access_log_aggregate"
  }
}

Input Schema

NameRequiredDescriptionDefault
topkNo
fieldYes
queryNo{}
minutesNo
end_timeNo
namespaceNo
start_timeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/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 behavioral burden: it discloses the selectable fields, the label-selector syntax with a concrete example, and the time-window formats. It omits how `minutes` interacts with explicit start_time/end_time when both/all are supplied, whether topk has a cap, and the `namespace` parameter entirely — meaningful gaps for a 7-parameter tool.

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?

The purpose is front-loaded in the first line, and the field list is dense but earns its place since the schema has no enum for `field`. The query and window lines are compact and example-driven with no filler.

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?

Return values need not be explained because an output schema exists, and the field/query/window semantics are covered. Still, an agent calling this cannot determine `topk` bounds, what `namespace` scopes, or the precedence rule when `minutes` and explicit timestamps conflict — gaps that matter at this parameter count.

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 0%, so the description must compensate, and it does explain `field`, `query`, and the three window parameters with format examples. However, `topk` — the parameter the tool is named after — and `namespace` get no mention at all, leaving two of seven parameters undocumented anywhere.

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 names a specific operation (top-k counts) on a specific resource (an access-log field) with a bounded scope (time window), and enumerates the aggregatable fields. It does not explicitly contrast itself with the raw-search sibling access_log_search, but the aggregation semantics are unambiguous.

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?

Usage is implied through the field enumeration and the query-selector example, which tells the agent this is for grouped counting rather than record retrieval. There is no explicit 'use X instead when Y' routing and no statement of when not to use it, so the agent must infer the boundary with access_log_search.

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