Skip to main content
Glama
jonasliesas

singlestore-mcp-server

by jonasliesas

Query History

query_history
Read-only

Analyze slow or long-running SingleStore queries over time, filter by runtime, and review tuning advice from stored history.

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) 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

TableJSON Schema
NameRequiredDescriptionDefault
tabNoqueries
hoursNo
min_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, but the description adds substantial context beyond that: the underlying data source (event tracing, information_schema.MV_TRACE_EVENTS), the ring-buffer/local-copy caveat for the trends tab, and an explicit instruction to render browser_url as a clickable link. It does not cover permissions or failure behavior, so it is not a full 5.

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?

Front-loaded with purpose, then usage, then a clearly labeled Args block, then the return-value note. Every section earns its place, though the prose is on the longer side and the tab explanation is dense.

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 correctly fills the gap by describing the browser_url return value and how to present it, and all three parameters are documented. For a read-only view-opening tool this is close to complete, with only error/permission behavior unaddressed.

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

Parameters5/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 entire burden and does so: min_seconds minimum of 1, hours meaning 'last N hours' with default 'everything in the history', and full semantics for all three tab values including what the trends and advisor tabs compute. This fully compensates for the undocumented schema.

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') and precisely enumerates the content returned (runtime, user, database, result) with a min-runtime filter. It distinguishes itself from cluster_monitor but does not explicitly differentiate from the closely named siblings query_history_trends, query_history_advisor, query_history_data, and query_history_event, which the tab parameter arguably overlaps.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use ('when the user asks about slow / long-running queries or jobs over time') and an explicit contrast with the alternative ('the Cluster Monitor shows only what's running now'). The when/when-not routing is unambiguous.

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