Skip to main content
Glama
S-CurveLabs

io.github.S-CurveLabs/sqlglass

Official
by S-CurveLabs

describe_table

Read-only

Inspect a table or view's columns, keys, indexes, foreign keys, and row count before writing SQL to prevent errors.

Instructions

Columns (type, nullability, identity/computed), primary key, indexes, foreign keys in both directions and row count of one table or view. Always do this before writing SQL against a table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
connectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With readOnlyHint=true, the safety profile is already covered by annotations. The description adds a useful scope constraint (one table or view) and output detail, but it does not disclose any potential costs, errors, or limitations such as row-count performance on large tables.

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 compact sentences: the first front-loads the exact result contents, the second gives a high-value workflow rule. No filler or repetition.

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?

Despite lacking an output schema, the description specifies the returned metadata well and includes a usage directive. It is slightly incomplete because it does not clarify how table names should be qualified or when the connection parameter is needed, but it is adequate for a simple 2-parameter tool.

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 0%, so the description should explain what table/connection mean; it does not. The 'table' parameter is inferable from the tool name and 'one table or view,' but the optional connection parameter is never addressed.

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?

The description enumerates exactly what is returned (columns with type/nullability/identity/computed, primary key, indexes, foreign keys, row count), so an agent knows this is a schema-introspection tool for a single table or view. It does not name a sibling alternative, but the concreteness separates it from list_tables or profile_table.

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?

'Always do this before writing SQL against a table' is an explicit when-to-use rule tied to the SQL-writing workflow. It does not state when not to use it or name alternatives, but the rule is strong enough to guide selection.

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