Skip to main content
Glama
Yukuiii

any-db-mcp

by Yukuiii

describe_table

Inspect any table to retrieve column definitions, indexes, foreign keys, estimated row counts, and sample data before writing SQL, reducing guesswork about structure and real values.

Instructions

查看指定表的详细信息,一次返回:列定义/索引/外键/估算行数/数据采样。PostgreSQL/MSSQL/Oracle 跨 schema 同名表时应传 schema 精确定位。LLM 在写 SQL 前调用此工具可同时拿到字段结构、关联关系、表大小量级、字段真实取值示例,大幅减少猜测。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes要查看的表名
schemaNo仅 PostgreSQL/MSSQL/Oracle 使用:schema 名称,用于跨 schema 精确定位
sampleLimitNo采样数据行数,默认 3,0 表示不采样,最大 20

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.2

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It usefully details the return payload (structure, relations, size magnitude, sample values), but says nothing about whether sampling executes real queries on large tables, permission/auth requirements, or read-only safety. The payload disclosure is valuable but behavioral traits are only partially covered.

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?

Three sentences, front-loaded with the return contents, followed by the schema-locating rule and the pre-SQL usage note. No filler, though the final sentence slightly retreads the enumerated return list.

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?

There is no output schema, so the description must (and does) enumerate the return fields, making it callable without guessing. With no annotations either, it is nearly complete, with minor gaps only around cost/side effects of sampling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds genuine value beyond the schema by explaining when the 'schema' parameter matters (PostgreSQL/MSSQL/Oracle disambiguation across same-named tables), which the schema text only states flatly.

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 verb+resource ('查看指定表的详细信息') and enumerates exactly what is returned: column definitions, indexes, foreign keys, estimated row count, and data sampling. This clearly distinguishes it from siblings like list_tables and search_schema, which do not return full structural detail.

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 explicit timing guidance ('LLM 在写 SQL 前调用此工具', call before writing SQL) and a conditional rule for when to pass schema. However, it does not name alternative tools (e.g. search_schema, list_tables) or state exclusions, so it falls short of the full when/when-not/alternatives standard.

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