Skip to main content
Glama

trend_query

Read-onlyIdempotent

Get time-bucketed trend data for a table (useful for monthly/weekly trend charts)

Instructions

Get time-bucketed trend data for a table (useful for monthly/weekly trend charts)

Input Schema

NameRequiredDescriptionDefault
queryNoOptional encoded query filter
tableYesTable name (e.g., "incident")
periodsNoNumber of months to look back (1–120, default: 6)
group_byYesSecondary grouping field (e.g., "priority", "state")
date_fieldYesDate field to bucket by (e.g., "opened_at", "sys_created_on")

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.15.1
    • addedInput schema / properties / periods / default
      Added value: +6
    • changedInput schema / properties / periods / description
      Previous value: -"Number of months to look back (default: 6)"New value: +"Number of months to look back (1–120, default: 6)"
    • addedInput schema / properties / periods / maximum
      Added value: +120
    • addedInput schema / properties / periods / minimum
      Added value: +1
    • changedInput schema / properties / periods / type
      Previous value: -"number"New value: +"integer"
  2. First observedv1.0.2

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so safety behavior is covered. The description adds little beyond them: it doesn't clarify what the time buckets look like, whether granularity is fixed or derived from the periods value, or how missing date values are handled — and there is no output schema to fall back on.

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?

A single front-loaded sentence with no filler. Slightly under-specified rather than overly long, but structurally clean.

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?

For a read-only tool with full schema coverage and annotations, this is close to adequate, but there is a real ambiguity left unaddressed: the description mentions weekly and monthly trends while periods is defined only in months, so an agent cannot tell how bucket width is controlled or what the response rows look like.

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 100%, so every parameter (query, table, periods, group_by, date_field) is already documented with examples and ranges. The description adds no parameter-level detail, which is acceptable at high coverage but earns only the baseline.

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 (get) and resource (time-bucketed trend data for a table) plus its typical use case. It differentiates somewhat from aggregate/PA siblings by the 'trend' framing, but doesn't name any alternative tool explicitly.

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 parenthetical 'useful for monthly/weekly trend charts' implies the use case, but there is no explicit when-to-use vs. when-not, and no reference to the many overlapping siblings (run_aggregate_query, get_pa_time_series, nlq_query) that also produce aggregated time data.

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

Deploy Server

Other Tools