Skip to main content
Glama
igorolv

jdbc-mcp-server

columnStats

columnStats
Read-onlyIdempotent

Computes basic statistics for a specified column: total and non-null row counts, distinct values, and minimum/maximum values. Use it to quickly assess data quality and range.

Instructions

Measure basic extremes and cardinality for one known column: total/non-null rows, distinct count and min/max. Use columnDistribution for frequent values or columnHistogram for percentiles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
columnYes
schemaNo
connectionYesDatabase to run against. Call listConnections for valid names; do not guess.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNo
columnNoColumn whose basic statistics were measured.
schemaNo
maxValueNoMaximum observed non-null value for the column.
minValueNoMinimum observed non-null value for the column.
totalRowsYesTotal number of rows considered for this statistic.
nonNullRowsYesNumber of rows where the column value is not NULL.
distinctValuesYesEstimated or exact number of distinct non-null values.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark it read-only and idempotent, and the description adds behavioral scope: it operates on a single known column rather than scanning all columns, and it specifies exactly which statistics are computed. It does not mention return shape, but an output schema exists and the annotations cover safety.

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?

Two clauses in a single sentence: the first states purpose and outputs, the second gives routing to siblings. Every word earns its place, with no redundancy.

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?

For a simple read-only statistics tool with an output schema, the description covers what it computes and how it differs from related tools. Remaining gaps, such as how schema is selected or null handling, are minor given the output schema and annotation set.

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?

Schema description coverage is only 25% (only connection is described). The description clarifies that the column parameter targets one known column, but it does not explain table/schema semantics, the optionality of schema, or naming conventions. This insufficiently compensates for the low coverage.

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?

The description uses 'Measure' as a specific verb, identifies the resource as 'one known column', and enumerates the exact outputs (total/non-null rows, distinct count, min/max). It also names sibling tools columnDistribution and columnHistogram, distinguishing this from them.

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?

Explicitly states when to use this tool – for basic extremes and cardinality on one column – and when to use alternatives: columnDistribution for frequent values, columnHistogram for percentiles. The connection parameter guidance in the schema also directs the agent to listConnections for valid names.

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