Skip to main content
Glama
sqlscope-mcp

sqlscope-mcp

by 0xmortuex

describe_table

Read-onlyIdempotent

Inspect a SQLite table or view to get schema details, column types, keys, indexes, constraints, triggers, statistics, and sample rows for understanding data and relationships.

Instructions

Describe one table or view in depth: columns with declared type, NOT NULL, default, primary key and generated-column flags; per-column NULL percentage, distinct count, min, max and the storage types actually seen (computed over a sample of up to stats_sample rows); foreign keys in both directions; indexes; CHECK constraints; triggers; the CREATE statement; and sample rows. BLOBs are shown as size plus a hex prefix, long text is truncated with its length.

table: table or view name (case-insensitive; a close-match hint is given if it does not exist). sample_rows: how many example rows to show (0-50). stats_sample: rows to sample for the statistics (100-200000).

Input Schema

NameRequiredDescriptionDefault
pathYes
tableYes
sample_rowsNo
stats_sampleNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive, closed-world behavior, so the description's added value is in the details it does supply: statistics are computed over a sample of up to stats_sample rows, BLOBs render as size plus hex prefix, long text is truncated with its length, and a close-match hint is returned for a nonexistent table. The main unstated behavior is the cost/latency of a large stats_sample and any truncation limits on the CREATE statement or constraint lists.

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 capability list is front-loaded in a single dense sentence followed by clean per-parameter lines, so information is easy to scan and nothing is padding. The lead sentence is a long run-on enumeration that could have been bulleted, but the trade-off buys brevity.

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 read-only introspection tool with an output schema present, the definition is largely sufficient: it tells the agent what categories of metadata come back and how large payloads are abridged. The gaps are the undocumented required `path` argument and the absence of any note about result size or runtime as stats_sample grows.

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 0%, so the description must carry the parameter burden, and it only partially does. It documents table (case-insensitive, with close-match hint), sample_rows (0-50) and stats_sample (100-200000), adding real meaning over bare titles, but the required `path` parameter is never mentioned in the description and has no schema description either, leaving the most fundamental parameter unexplained.

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?

Names a specific verb (describes) and resource (one table or view) and then enumerates exactly what is returned: columns with type/NOT NULL/default/PK/generated flags, per-column stats, FKs in both directions, indexes, CHECK constraints, triggers, CREATE statement and sample rows. The scoping to a single object implicitly separates it from db_overview and schema_graph, so an agent can tell what it gets without opening the schema.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: an agent can infer this is the deep-dive tool for one table when db_overview/schema_graph are too coarse, and the sample_rows: 0-50 range hints that 0 skips examples. However, no sentence explicitly says when to prefer this over schema_docs, find_in_db or query, and no exclusions or prerequisites (e.g. must the DB be attached at path first?) are given.

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