Skip to main content
Glama

Analyze Table Statistics

analyze-table-statistics
Read-onlyIdempotent

Analyze a table's row count, column statistics, and data distribution in Firebird to assess data volume, quality, and patterns before querying or tuning.

Instructions

Analyzes statistical information about a table including row count, column statistics, and data distribution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNameYesName of the table to analyze

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoFailure information; present when success is false
resultNoThe legacy JSON payload; present for completed operations and partial batches
successYesFalse for tool failures, including partially failed batches

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.12.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "__schema0": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        },
      +        {
      +          "items": {
      +            "$ref": "#/$defs/__schema0"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "additionalProperties": {
      +            "$ref": "#/$defs/__schema0"
      +          },
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        }
      +      ]
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "error": {
      +      "additionalProperties": false,
      +      "description": "Failure information; present when success is false",
      +      "properties": {
      +        "details": {
      +          "additionalProperties": {
      +            "$ref": "#/$defs/__schema0"
      +          },
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "type": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "message",
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    "result": {
      +      "additionalProperties": false,
      +      "description": "The legacy JSON payload; present for completed operations and partial batches",
      +      "properties": {
      +        "columnCount": {
      +          "type": "number"
      +        },
      +        "columns": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "hasDefault": {
      +                "type": "boolean"
      +              },
      +              "name": {
      +                "type": "string"
      +              },
      +              "nullable": {
      +                "type": "boolean"
      +              },
      +              "type": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "name",
      +              "type",
      +              "nullable",
      +              "hasDefault"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "rowCount": {
      +          "type": [
      +            "number",
      +            "string"
      +          ]
      +        },
      +        "sampleSize": {
      +          "type": "number"
      +        },
      +        "tableName": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "tableName",
      +        "rowCount",
      +        "columnCount",
      +        "sampleSize",
      +        "columns"
      +      ],
      +      "type": "object"
      +    },
      +    "success": {
      +      "description": "False for tool failures, including partially failed batches",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. Addedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds only the content of the analysis; it omits that statistics computation can be an expensive/heavy operation and whether results are cached or live-sampled.

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?

One efficient sentence with the resource and returned information front-loaded and no filler. It is well-sized for a single-parameter read tool.

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?

With an output schema present and annotations covering safety, the description need not explain return values. The remaining gap is the cost/behavioral profile of statistics analysis, which is minor for a low-complexity, single-input read tool.

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% for the single tableName parameter, so the schema already carries the parameter semantics. The description adds nothing about naming conventions, qualification, or lookup behavior beyond what the schema states.

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 ('Analyzes') and resource ('a table') and enumerates the outputs (row count, column statistics, data distribution), which distinguishes it from the descriptive siblings like describe-table. However, it never names or contrasts with those siblings explicitly.

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 gives no indication of when to use this tool versus describe-table or get-table-data, no prerequisites, and no exclusions. The agent must infer usage from the name alone.

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