Skip to main content
Glama

Get query insights

helix_get_query_insights
Read-onlyIdempotent

Get per-query statistics for one database over a time window: how often each query ran and failed, its average and maximum latency, and what the query planner found. Latency percentiles are helix_get_query_latency's, and recommendations helix_list_query_recommendations's.

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": {
      "database": "<database>"
    },
    "name": "helix_get_query_insights"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoExclusive RFC3339 end time. Supply together with start instead of period.
sortNoHow to order the queries; last_seen when empty.
limitNoMaximum insights to return, from 1 through 20.
startNoInclusive RFC3339 start time. Supply together with end instead of period.
periodNoA period ending now. Or give start and end instead.
databaseYesDatabase reference in cluster:<id> or tenant:<id> form.

Output Schema

NameRequiredDescriptionDefault
windowYes
databaseYes
insightsYes
content_trustYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and a closed-world scope, so the safety profile is covered. The description adds useful context beyond that: results are scoped to exactly one database and a bounded time window, and 'what the query planner found' signals that non-metric, diagnostic content is included. It does not mention result caps or pagination, though the limit parameter caps at 20 in the schema.

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?

Two sentences, zero filler, and the core scope (one database, time window, what you get back) is front-loaded before the sibling disambiguation. Every clause carries information an agent needs to select or invoke the tool.

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

Completeness5/5

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

With an output schema, full parameter descriptions, and complete annotations, the description only needs to establish purpose, scope and sibling boundaries, which it does. Nothing required for correct invocation is absent.

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%, including enum values for sort and period and the RFC3339 semantics of start/end, so the schema does the heavy lifting. The description only implies the time-window parameters via 'over a time window' and adds no syntax, defaults, or interaction rules (e.g. period versus start/end) beyond what is already written.

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

Purpose5/5

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

States a specific verb and resource ('Get per-query statistics for one database over a time window') and enumerates the returned facts: run/failure counts, average and maximum latency, and planner findings. It also names the siblings that own the adjacent data, so an agent can tell it apart from helix_get_query_latency and helix_list_query_recommendations without opening either schema.

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

Usage Guidelines4/5

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

Routing is explicit for the two closest alternatives: latency percentiles belong to helix_get_query_latency and recommendations to helix_list_query_recommendations, which implicitly scopes this tool to counts/latency aggregates/planner output. What is missing is any when-not-to-use or prerequisite context, such as required access to the database or whether the window has a maximum span.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources