Skip to main content
Glama
peakacom

peaka-mcp-server

Official
by peakacom

peaka_get_table_statistics

Read-only

Retrieve column-level statistics for a table to estimate distinct fraction per column, aiding cardinality estimation and query optimization.

Instructions

Get column-level statistics for a table in the Peaka project. Returns the catalog/schema/table identifiers and a per-column distinctFraction (estimated fraction of distinct values vs total rows), useful for cardinality estimation and query optimization.

If you do not already know the projectId for the current task, call peaka_list_projects first and ask the user which project to use. Remember the chosen projectId for subsequent calls in this conversation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
catalogIdYes
projectIdYesThe Peaka project ID to run against.
tableNameYes
schemaNameYes
Behavior4/5

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

Annotations declare readOnlyHint=true, and description confirms it returns statistics. Description adds context about distinctFraction output, which is beyond annotations. No contradiction, but annotations already cover read-only nature.

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 succinct paragraphs: first explains what the tool does, second provides usage guidance. No unnecessary words, well-organized.

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?

The description adequately explains the tool's purpose and output (distinctFraction) and includes usage flow. Since no output schema exists, it covers return values sufficiently but could mention the full return structure (identifiers + stats) more explicitly.

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 projectId has a description). The description does not elaborate on catalogId, schemaName, or tableName beyond their names. With low schema coverage, the description should compensate but does not.

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 states it retrieves column-level statistics for a table, specifically per-column distinctFraction, with clear purpose for cardinality estimation and query optimization. This distinguishes it from sibling tools like peaka_list_tables or peaka_list_columns.

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 instructs to call peaka_list_projects first if projectId is unknown and to remember the chosen projectId. This provides clear when-to-use and prerequisite guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/peakacom/peaka-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server