Skip to main content
Glama
devaloi

mcpserve-py

by devaloi

query_database

Execute read-only SQL SELECT queries against SQLite databases to retrieve data for AI assistants, supporting optional parameters.

Instructions

Execute a read-only SQL query against the SQLite database. Only SELECT statements are allowed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL SELECT query to execute
paramsNoOptional query parameters for parameterized queries

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It usefully discloses the read-only guarantee and the SELECT-only restriction, which is real value, but says nothing about result size limits, pagination, timeout behavior, or error handling for rejected statements.

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 short sentences with no filler, and the primary capability is front-loaded ahead of the constraint. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read tool this is roughly adequate, but with no output schema and no annotations the description could reasonably describe the result shape or constraints on returned rows. It stops just short of 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 100%, so both parameters (sql, params) are already documented in the schema, setting the baseline at 3. The description reinforces the SELECT-only constraint on the sql parameter but adds no syntax, formatting, or parameterization guidance beyond what the schema states.

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?

States a specific verb (Execute) and resource (read-only SQL query against the SQLite database), which is clear on its own. It does not, however, explicitly distinguish itself from siblings like describe_table or list_tables, so an agent must infer that this is the tool for arbitrary data retrieval rather than schema introspection.

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?

The read-only/SELECT-only constraint implies the usage context (safe data retrieval, not mutation), but there is no explicit when-to-use guidance or mention of alternatives such as describe_table for schema discovery. Usage is left to inference.

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