Skip to main content
Glama

Queries Get Query History

queries_get_query_history
Read-onlyIdempotent

Retrieve recent SQL query execution history for the current Snowflake account or user. Use it to review past queries, troubleshoot performance, and audit activity.

Instructions

Retrieve recent query execution history for the current account/user.

Input Schema

NameRequiredDescriptionDefault
limitNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.4

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, openWorld, so the safety profile is covered and the bar is lower. The description adds the useful scoping fact that results are limited to the current account/user and are 'recent', but it discloses nothing about the retention window, result count behavior, or pagination, so the addition is modest rather than rich.

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?

One short, front-loaded sentence with no filler and the resource stated immediately. It is efficiently sized, though the brevity borders on under-specification rather than tightness.

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 explained, but for a history tool the description should still pin down what 'recent' means (retention window) and how 'limit' interacts with it. As written it is minimally viable but leaves real gaps an agent must guess at.

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?

The single parameter 'limit' has 0% schema description coverage, and the description never mentions it, its default of 20, or any upper bound. With an undocumented parameter, the description fails to compensate for the schema gap; only the implied 'recent' framing hints at result sizing.

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 (Retrieve) and resource (query execution history) with a clear scope qualifier ('recent', 'current account/user'). However, it never distinguishes itself from adjacent read siblings such as queries_query or warehouses_get_warehouse_load_history, so an agent cannot route between them from the description alone.

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 explicit when-to-use guidance, no prerequisites, and no named alternative. 'Recent' implies some freshness window but the description never says when to reach for this versus running a query or pulling warehouse load history, leaving usage entirely to inference.

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