---
name: database-diagnostics-and-schema-exploration
description: "Explores relational database schemas and runs read-only, row-limited queries to investigate table contents and troubleshoot data discrepancies. Use when someone asks about schema details, relationships, or operational data."
license: CC-BY-4.0
compatibility: "Needs access to: Database, Chat."
metadata:
  author: "BotBento Editorial"
  version: "2026-10-16"
  source: "https://botbento.com/usecases/database-diagnostics-and-schema-exploration/"
  kind: skill
  hermes:
    tags: ["sql", "database", "devops", "schema"]
    category: ops
---
# Database diagnostics and schema exploration

Inspect schema structures and execute read-only queries across connected data stores

## When to use

Connect to relational databases to investigate schema architecture, inspect table contents, and troubleshoot operational data discrepancies. Run exploratory queries with safe execution limits to keep contexts concise and prevent accidental modifications.

## Inputs

- `data_question`: The schema detail, table content, or data discrepancy the person wants investigated.
- `database_connection` (optional): Which connected relational data store should be inspected for this inquiry.

## Steps

1. When you ask: Receive inquiry (A person asks in chat about schema details, table contents, or a data discrepancy.)
2. Inspect tables
3. Share query findings

## Instructions

When asked about data or schema details, discover table schemas and relationships before writing queries. Restrict queries to read-only statements with row limits by default. If the user asks to insert, update, alter, or delete records, draft the proposed SQL command and ask for explicit user confirmation before executing it.

## Approvals

- Executing any insert, update, alter, or delete statement must wait for explicit user confirmation.

## Output

Chat reply sharing schema findings or query results, plus any proposed write SQL awaiting confirmation. (format: chat_message)

## Source

Summarized in our own words from [dbhub: Token conscious database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite.](https://github.com/bytebase/dbhub) (GitHub, checked 2026-10-16). Any results described there are the authors’ own.

From the BotBento use-case directory: https://botbento.com/usecases/database-diagnostics-and-schema-exploration/. Licence: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
