Skip to main content
Glama

get_histogram

Retrieve optimizer histogram endpoints for a table column to assess data skew and cardinality estimates.

Instructions

Return the optimizer histogram endpoints for a column (frequency or height-balanced). Useful to understand data skew and cardinality estimates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name.
columnYesColumn name.
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

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses what is returned (endpoint values, histogram type), which implies a read operation, but says nothing about permissions, read-only nature, error behavior, or pagination.

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?

Two sentences, front-loaded with the return content and followed by the use case; both sentences earn their place with no filler.

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 low-complexity read tool with fully documented parameters and no output schema, the description covers what it returns and why it matters. It is largely complete, with only minor gaps around output format and safety.

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%, so table, column, and schema are already documented in the schema (including the default-schema guidance). The description adds no parameter meaning 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?

States a specific verb (Return) and resource (optimizer histogram endpoints for a column), and names the two histogram types (frequency, height-balanced). This clearly distinguishes it from a plain stats tool, though it does not explicitly contrast with the close sibling get_column_stats.

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

Usage Guidelines3/5

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

"Useful to understand data skew and cardinality estimates" gives a rationale for calling it, but there is no explicit when-to-use versus alternatives like get_column_stats or get_table_stats, and no exclusions or prerequisites.

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