Skip to main content
Glama

Stats Query

stats_query

Query numeric field statistics in Loggly logs by specifying a stat type and field to calculate averages, sums, percentiles, or counts.

Instructions

Calls /apiv2/stats// for numeric field statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNo-24h
fieldYes
queryNo*
untilNonow
accountNo
stat_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral burden. It discloses only that the tool calls an API endpoint for numeric field statistics, but says nothing about read-only nature, required permissions, rate limits, response format, or what the various stat_type modes return.

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 description is a single, front-loaded sentence with no filler or repetition. It is concise, though its extreme brevity leaves important details unstated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a 6-parameter tool with an enum, defaults, no annotations, and no output schema, the description is severely incomplete. It does not explain parameter semantics, expected return values, or how to interpret the different stat_type modes, leaving an agent unable to invoke the tool correctly without external knowledge.

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

Parameters2/5

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

Schema description coverage is 0% across 6 parameters, so the description must compensate. It only mentions 'stat_type' and 'field' via the endpoint path, leaving 'from', 'until', 'query', and 'account' entirely unexplained, and it does not clarify the enum values or defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (Calls) and resource (the /apiv2/stats/... endpoint) for 'numeric field statistics', which is clearer than a tautology. However, it does not differentiate this tool from siblings like field_facets or volume_metrics, and it leans on an internal endpoint path rather than a user-facing purpose statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives such as field_facets, volume_metrics, or count_events. The description simply states what the endpoint does, leaving the agent to infer appropriate usage contexts.

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