Skip to main content
Glama
igorolv

jdbc-mcp-server

columnDistribution

columnDistribution
Read-onlyIdempotent

Analyze a column's value distribution by returning top-N values, their counts, and row shares to identify frequency and skew in a table.

Instructions

Measure value frequency and skew for one known column by returning top-N values, counts and row shares. Use columnStats for only cardinality/extremes; runs GROUP BY + COUNT and may be expensive on large tables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNNoTop values to return (default 20, max 1000).
tableYes
columnYes
schemaNo
connectionYesDatabase to run against. Call listConnections for valid names; do not guess.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNYesMaximum number of most-frequent values requested for the distribution.
tableNo
columnNoColumn whose value frequencies were measured.
schemaNo
valuesNoMost frequent values and their frequencies for the column.
topRowsYesRows covered by the returned top-N value buckets.
topRatioYesShare of all rows covered by the returned top-N buckets, from 0.0 to 1.0.
otherRowsYesRows not represented by the returned top-N value buckets.
totalRowsYesTotal number of rows considered for this statistic.
otherRatioYesShare of all rows outside the returned top-N buckets, from 0.0 to 1.0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is known. The description adds value beyond annotations by disclosing that execution performs GROUP BY + COUNT and may be expensive on large tables. This is useful behavioral context.

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?

The description is two sentences with no fluff. It front-loads the core purpose, immediately gives the sibling distinction, and ends with a concise performance warning. Every sentence contributes useful information.

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?

Given the output schema exists, the description does not need to explain return values. It covers purpose, usage distinction, and cost. The only minor gap is that it doesn't mention that schema is optional, but required parameters and the connection hint largely compensate.

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

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds some meaning beyond the schema by clarifying that column must be a single known column and by referencing top-N values, which maps to the topN parameter. However, with only 40% schema description coverage, the description does not fully compensate for the lack of documentation on schema and table parameters.

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 a specific verb ('Measure') with a clear resource ('value frequency and skew for one known column') and states the output shape ('top-N values, counts and row shares'). It also distinguishes itself from a sibling tool, columnStats, by naming what that tool is for.

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?

The description explicitly says when to use columnStats instead ('for only cardinality/extremes'), which implies when to use this tool (i.e., when distribution and skew are needed). It also warns that the tool runs GROUP BY + COUNT and may be expensive, giving practical usage guidance.

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