Skip to main content
Glama

profile_table

Read-only

Deterministically profile a table: row count, column types, enum degree, monotonicity, primary key candidates, cumulative sum checks, and role detection for reverse-engineering game spreadsheet structures.

Instructions

单表画像(确定性统计,无 LLM):行数、列类型分布、枚举度(distinct/行数)、单调性(递增/递减/无)、主键候选(唯一且非空列)、累计列校验(某列≈另一列逐行前缀和,取整容差)、角色候选(growth=有等级列且存在等差模式列;master_data=有索引/序号类列;cost=累计列校验成立)。逆向理解单表结构先用它,结论可经 save_structure 固化。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes目标表名(来自 list_tables)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, it discloses that the tool is deterministic and LLM-free, and it fully specifies the behavioral criteria for each output category, including formulas like distinct/rows and prefix-sum with rounding tolerance. This gives an agent confidence about repeatability and side-effect-free execution.

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?

The key purpose and nature are front-loaded ('单表画像,确定性统计,无 LLM'), and subsequent clauses compactly enumerate the computed metrics and heuristics. It is dense but every element carries information; only a slightly monolithic long sentence prevents a perfect structure score.

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 one-parameter tool with no output schema, the description clearly lists what the agent will get back and even gives role-candidate rules and the follow-up save_structure action. It does not specify exact return shapes or edge-case behavior, but the essential selection and invocation information is present.

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 input schema already documents the only parameter ('目标表名(来自 list_tables)') with 100% coverage, so the baseline is 3. The description does not add parameter-specific guidance beyond saying the profile is for a single table, which is not additional semantic value.

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 a specific action and resource: profiling a single table with deterministic statistics, and it enumerates the exact metrics returned (row count, type distribution, cardinality, monotonicity, PK candidates, cumulative-column check, role candidates). It explicitly positions itself for '逆向理解单表结构先用它', which distinguishes it from relation/column-level siblings.

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

Usage Guidelines4/5

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

It gives a clear usage context: use this first when reverse-engineering a single table, and route results to save_structure for persisting conclusions. It does not explicitly state when not to use it or name alternatives for exclusion, so it stops short of a full 5.

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