Skip to main content
Glama
akrym1582

sqldb-mcp-server

by akrym1582

query

Run read-only SQL SELECT statements to retrieve database data in a compact column/row format. Supports pagination with skip/take and returns total matching rows.

Instructions

Execute a read-only SELECT SQL query. Returns results in a compact column/row format to reduce token usage. Results are capped at 100 rows; use skip/take for pagination. The meta.totalCount field shows the total number of matching rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSELECT SQL statement to execute
skipNoNumber of rows to skip (offset)
takeNoMaximum rows to return (max 100)
databaseNoDatabase to query; omit to use the default database

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / database
      Added value: +{
      +  "description": "Database to query; omit to use the default database",
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. First observedv0.1.1

TDQS

A4.4/5.0
Behavior4/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 key behaviors: read-only operation, compact column/row output to reduce tokens, a 100-row cap, pagination via skip/take, and the meta.totalCount field. It does not cover error handling or authentication, but for a query tool the core behaviors are well articulated.

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 sentences with zero filler. The purpose is front-loaded, and each sentence adds a distinct piece of information (read-only, output format, pagination/totalCount). The structure is highly efficient.

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 query tool with no output schema, the description adequately covers the return format, row limits, and pagination. It does not mention error behavior or SQL dialect specifics, but these are not critical for basic invocation. Given the tool's complexity, the description is largely complete, though not exhaustive.

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 parameters. The description adds value by clarifying pagination semantics (skip/take) and the output format (compact format, totalCount field), which goes beyond the raw schema. This is useful behavioral context that helps the agent understand parameter interplay.

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 clearly states the tool executes a read-only SELECT SQL query, which is specific and distinct from siblings like explainQuery (which explains) and exportQuery (which exports). The read-only constraint is explicitly mentioned, making the purpose unambiguous.

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?

The description gives clear context for use: it's for read-only SELECT queries, with pagination guidance (use skip/take). It does not explicitly mention when not to use it or point to alternatives, but the context is sufficient for typical selection. No exclusions are stated, so it earns a 4.

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