Skip to main content
Glama

aggregate_logs

Read-only

Count log records over time and group them by attributes to analyze trends and identify patterns in Dynatrace logs. Filter by query and time range for targeted log analysis.

Instructions

Count log records over time and by attribute (GET /api/v2/logs/aggregate). Needs logs.read.

Input Schema

NameRequiredDescriptionDefault
queryNoLog query to filter on
to_timeNoEnd: now, ISO-8601 or epoch msnow
group_byNoAttributes to group by, e.g. ['status','log.source']
from_timeNoStart: now-2h, ISO-8601 (2026-10-31T10:00:00Z) or epoch msnow-2h
time_bucketsNoNumber of time buckets
max_group_valuesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description usefully adds the required permission, "Needs logs.read." It does not disclose aggregation semantics such as bucket behavior, group limits, or how the result is shaped, which would matter for an aggregation tool.

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 two short sentences with no filler. The core operation is front-loaded, followed by a concrete endpoint and permission requirement.

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 six-parameter read-only aggregation tool with 83% schema description coverage, the description covers purpose, endpoint, and authorization. It is reasonably complete, though it could better explain how grouping and bucketing shape the result.

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 high at 83%, so the schema already documents most parameters. The description only broadly mentions counting "over time and by attribute," which loosely maps to time_buckets/from_time/to_time and group_by without adding syntax or behavioral detail beyond the 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?

The description states a specific verb and resource: "Count log records over time and by attribute," and adds the endpoint. This clearly distinguishes an aggregation operation from raw log retrieval, though it does not explicitly name or differentiate from the closest sibling, search_logs.

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 phrase "Count log records over time and by attribute" implies when to use it, and "Needs logs.read" gives a prerequisite. However, it does not say when to prefer it over search_logs or other log-related siblings, nor does it state any exclusions.

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