Skip to main content
Glama
jonasliesas

singlestore-mcp-server

by jonasliesas

Query History

query_history
Read-only

Open the Query History: every finished query on the cluster with its runtime, user, database and result, filtered by minimum runtime (1 s and up). Select a query in the app for tuning recommendations.

Instructions

Open the Query History: every finished query on the cluster with its runtime, user, database and result, filtered by minimum runtime (1 s and up). Select a query in the app for tuning recommendations.

Uses SingleStore's query history (event tracing, information_schema.MV_TRACE_EVENTS). Use this when the
user asks about slow / long-running queries or jobs over time (the Cluster Monitor shows only what's
running now).

Args:
    min_seconds: Only queries that ran at least this long (minimum 1).
    hours: Only the last N hours (default: everything in the history).
    tab: "queries" (default), "trends" (daily / hourly load, failures and p95 from a local copy of the history
        kept across the cluster's ring buffer, plus queries that got slower), "usage" (most used tables and
        most active users) or "advisor" (table-design advice from the whole history).

The result includes ``browser_url``: post it as a clickable link right under the app.

Input Schema

NameRequiredDescriptionDefault
tabNoqueries
hoursNo
min_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.1

TDQS

A4/5.0
Behavior4/5

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

readOnlyHint=true already establishes it as a safe read. The description adds beyond that: the data source (event tracing, information_schema.MV_TRACE_EVENTS), that trends/usage come from a local copy kept across the cluster's ring buffer (bounded retention), and that the result carries a browser_url to post as a clickable link.

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?

Purpose and routing constraint are front-loaded, then a clear Args block. Slightly verbose in the tab explanation but every clause carries distinct information; little wasted text.

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

Completeness4/5

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

With no output schema, the description covers return essentials (runtime, user, database, result, browser_url) and all three parameters for a 0%-coverage schema. The only real gap is the unresolved relationship between the 'tab' values and the many sibling history tools.

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

Parameters4/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 and largely meets it: it defines min_seconds ('at least this long, minimum 1'), hours ('last N hours, default everything in the history') and all four tab values with distinct meanings. It does not note the schema-level default of tab='queries' explicitly matching the arg text, but the semantics are otherwise well covered.

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 and resource ('Open the Query History: every finished query on the cluster with its runtime, user, database and result') and even names the underlying source (MV_TRACE_EVENTS). It distinguishes itself from cluster_monitor ('shows only what's running now') but does not resolve its overlap with close siblings like query_history_data, query_history_event, query_history_trends or query_history_usage.

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?

Explicit when-to-use ('user asks about slow / long-running queries or jobs over time') with one named alternative/exclusion (Cluster Monitor). However, it does not explain how the 'tab' values relate to the standalone sibling tools query_history_trends, query_history_usage, query_history_advisor, which appear to expose the same 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