Skip to main content
Glama
igorolv

jdbc-mcp-server

benchmarkQuery

benchmarkQuery
Read-onlyIdempotent

Measure repeatable query latency using separate cold and warm runs to compare SQL rewrites, not retrieve data. Returns last result size (rows, columns, truncated).

Instructions

Measure repeatable query latency with separate cold runs and min/median/max warm-run timings. Use for comparing query rewrites, not retrieving data; timedQuery is the one-run alternative that returns rows. Bind '?'->params, ':name'->namedParams; never mix. E.g. :status -> namedParams={status:'PAID'} — key is the bare name. Returns the size of the last result (rows, columns, truncated), not the rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
limitYesRow limit per run (> 0).
paramsNoValues for '?' placeholders, in order.
coldRunsNoCold runs (default 1); executed first.
warmRunsNoWarm runs (default 3).
connectionYesDatabase to run against. Call listConnections for valid names; do not guess.
namedParamsNoValues for ':name' placeholders, keyed by name.
timeoutSecondsYesTimeout per run in seconds (> 0).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoAdditional context about support, limits, interpretation, or engine-specific behavior.
runsYesNumber of measured runs included in these timing statistics.
allMsNoIndividual elapsed times for all benchmark executions, in milliseconds.
limitYesRow limit applied to the query or page size requested by the caller.
coldMsNoTiming statistics for cold benchmark runs in milliseconds.
engineNoDatabase engine that produced the result, such as PostgreSQL, Oracle, SQL Server, Firebird, or SQLite.
warmMsNoTiming statistics for warm benchmark runs in milliseconds.
coldRunsYesNumber of cold runs executed before warm measurements.
warmRunsYesNumber of warm runs used for the primary benchmark statistics.
resultSizeNo
timeoutSecondsYesPer-statement timeout applied during execution, in seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • changedOutput schema / properties / engine / description
      Previous value: -"Database engine that produced the result, such as PostgreSQL, Oracle, or SQL Server."New value: +"Database engine that produced the result, such as PostgreSQL, Oracle, SQL Server, Firebird, or SQLite."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds real value beyond that: the cold-vs-warm execution model and the explicit return contract (result size only, not rows), which prevents a wrong assumption about output. It stops just short of the top tier because it doesn't note timeout or limit failure behavior.

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 first, then usage, then binding rules, then return shape — every clause contributes. It is dense and semicolon-packed, but no sentence is wasted.

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?

For an 8-param benchmark tool with 88% schema coverage and an existing output schema, the definition supplies the remaining essentials: purpose, alternative, binding syntax, and a summary of the return contract. An agent has everything needed to call it correctly.

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 coverage is already 88%, so baseline is 3, but the description adds non-obvious binding semantics: '?'->params, ':name'->namedParams, never mix, and the bare-name example for named keys. That is meaning the schema's terse descriptions do not carry.

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 precise verb+resource (measure query latency) with the distinguishing scope detail of separate cold and warm runs. It explicitly separates itself from the sibling timedQuery, so an agent can choose 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 Guidelines5/5

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

"Use for comparing query rewrites, not retrieving data" gives both the intended use and the exclusion, and it names the alternative (timedQuery) with the condition (one-run, returns rows) that selects it. Nothing is left to inference.

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