Skip to main content
Glama

Queries Get Query Operator Stats

queries_get_query_operator_stats
Read-onlyIdempotent

Retrieve operator-level execution statistics and profiling data for a past Snowflake Query ID to troubleshoot query performance.

Instructions

Retrieve operator-level execution statistics and profiling data for a past Query ID.

Input Schema

NameRequiredDescriptionDefault
query_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.4

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered without the description. The description does add that results are operator-level profiling data tied to a historical query, but it omits whether profiling must be enabled on the query or how long stats are retained — real behavioral gaps for a stats-retrieval 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?

A single front-loaded sentence with no filler; the action, the data returned, and the input scope are all present and nothing is wasted.

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?

An output schema exists, so return values need not be described, and annotations cover the safety profile. What remains missing is eligibility context — how to obtain a valid Query ID and any conditions under which operator stats are unavailable — leaving the definition minimally adequate rather than complete.

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 carries the burden for the single query_id parameter. It clarifies that the ID must refer to a past (already-executed) query, which adds genuine meaning beyond the bare string type, but no format or sourcing guidance (e.g., where to obtain the ID) is given.

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 verb (Retrieve) and a specific resource (operator-level execution statistics and profiling data), scoped to a past Query ID. It is clearly distinguishable from sibling read tools like queries_get_query_plan or queries_get_query_history, though it does not explicitly contrast itself with them.

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 reach for this tool versus queries_get_query_plan or queries_get_query_history, nor any stated prerequisite (e.g., the query must have finished, profiling may need to be enabled). The phrase 'for a past Query ID' loosely implies a completed query but stops short of an instruction.

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