Skip to main content
Glama

get_column_stats

Retrieve optimizer statistics for table columns, including NDV, density, null count, bucket count, low/high value, and histogram type. Filter results by optional column or schema.

Instructions

Return optimizer statistics for columns of a table: number of distinct values (NDV), density, null count, bucket count, low/high value, histogram type. Optional column filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name.
columnNoOptional column name filter.
schemaNoSchema (owner) of the table. Optional — defaults to the server's current schema; omit rather than guess.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.3

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does useful work by disclosing the exact shape of the payload (the metric list) for a tool with no output schema, but it never states that this is a read-only dictionary lookup, whether statistics may be stale/missing if never gathered, or how it behaves for a nonexistent table or column.

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 the verb and resource, then the returned metrics, then the filter note — dense and almost waste-free. The trailing 'Optional column filter' fragment slightly duplicates the schema's column description, a minor 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 read-only stats lookup with a fully documented 3-parameter schema and no output schema, enumerating the returned metrics in the description is the right compensation. It is slightly short on context about stat provenance and staleness, but nothing needed to invoke the tool correctly is missing.

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?

Schema description coverage is 100%; all three parameters (table, column, schema) are documented directly in the schema, including a helpful 'omit rather than guess' warning for schema. The description only restates the optional column filter and adds no format, casing or default semantics beyond the schema, so the baseline 3 applies.

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?

Specific verb ('Return optimizer statistics') plus precise resource and granularity ('columns of a table'), and it enumerates exactly which metrics come back (NDV, density, null count, buckets, low/high, histogram type). It implicitly separates itself from table-level siblings like get_table_stats, but never names the neighboring get_histogram or get_table_stats, which is the only thing keeping it from a 5.

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

Usage Guidelines2/5

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

The description notes an 'Optional column filter' but gives no when-to-use guidance, no prerequisites (e.g., stats must have been gathered), and no routing against the obvious alternatives get_table_stats, get_histogram or describe_table. The agent must infer the choice purely from the tool name.

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