Skip to main content
Glama
AishwaryaDV

safe-db-mcp

by AishwaryaDV

describe_schema

Retrieves database tables, columns, keys, and sample rows so you can write SQL with accurate names. Call before writing queries to avoid schema mistakes.

Instructions

Return the tables, columns, keys, and a few sample rows for a database. Call this before writing SQL so you use real table and column names. Pass a table to inspect just one, or sample_rows=0 to omit the samples.

Input Schema

NameRequiredDescriptionDefault
tableNo
databaseYes
sample_rowsNo

Output Schema

NameRequiredDescriptionDefault
tablesYes
databaseYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 burden; it discloses that sample rows are returned and that sample_rows=0 suppresses them, which is genuine behavioral context for a read operation. It does not state permission requirements, cost or size of output on wide schemas, or what happens when a requested table does not exist.

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?

Three short sentences, front-loaded with purpose, then usage, then parameter shortcuts. Every clause adds information; nothing repeats the name or wastes space.

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?

An output schema exists, so the description need not explain return values, and it still summarizes them usefully. Combined with its handling of two of three parameters, only the undocumented `database` argument and missing error behavior keep it from being fully complete.

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 compensate. It adds real meaning for `table` (inspect a single table) and `sample_rows` (0 omits samples), but `database` — the only required parameter — gets no explanation of accepted forms or how to discover valid values, leaving a meaningful gap.

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?

Opens with a concrete verb and enumerates exactly what comes back: tables, columns, keys, and sample rows. It is clearly a schema-inspection tool, distinct from list_databases and run_query, though it never names 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 Guidelines4/5

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

'Call this before writing SQL so you use real table and column names' gives a clear trigger condition, and the same sentence tells you how to narrow scope with the table argument. It does not say when to prefer list_databases instead, but that tool's role is implied.

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