Skip to main content
Glama

engine_db_select

Run parameterized SQL selects to retrieve database records, manage large results with file snapshots, and check table dependencies.

Instructions

Read data. pool is a list of steps, each {"do":"select","sql":"..."} with optional params and name. A value belongs in params and not in the text of the sql: write :NAME in the sql, upper case, and put the value in params under that name in any case you like. That is what keeps a quote, an apostrophe or an alphabet of its own from breaking the query. Table names take {DBNICK}_ or the real nick, both work. Values come back whole - no truncation, no column limit - so ask for the rows you need, not for a million. A step over 5000 rows is refused unless it carries "big":true. A step that carries "file" keeps its rows there instead of in the answer - one json object to a line, at any size, path absolute or off the store folder: that is how a snapshot of what you are about to change is taken, and it belongs in your own folder, not under mcp/melbis, which is wiped without warning. The pool of this command also takes the dependent step (table, and ids when you have them): what hangs on that table, and how many rows point at those ids. It only reads, so it belongs here as much as a select. A pool too big to write out is built by a script and given as pool_file instead of pool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
poolNo
pool_fileNoPath on this machine, absolute or off the store folder, to a json file holding the pool - the same list of steps; instead of pool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv6.5.1

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it is exceptionally transparent: rows are returned whole with no truncation, steps over 5000 rows are refused unless marked big:true, file steps redirect output to a file, and the mcp/melbis folder is wiped without warning. It also explicitly says the tool only reads, which is critical safety information for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely dense and front-loaded with 'Read data', but it is a single run-on paragraph with semicolons and colons that make it hard to scan. All sentences carry useful information, so it is not padded, but bullet points or shorter sentences would significantly improve readability.

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 tool with two params and no output schema, the description covers nearly everything needed: input format, value binding, row limits, file output behavior, dependent steps, and the pool_file alternative. Exact response shape and the precise required combination of pool vs pool_file are not stated explicitly, but the practical invocation path is well covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50% and the pool parameter has no schema description, but the tool description thoroughly compensates: it defines pool step structure, the `:NAME` placeholder binding convention, table-name conventions, optional big/file flags, and clarifies that pool_file contains the same list of steps. This is far more actionable than the bare schema.

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?

The description opens with 'Read data' and immediately defines pool as a list of `{"do":"select","sql":"..."}` steps, making it clear this is a database read tool. It distinguishes itself from write/execute siblings by stating 'It only reads, so it belongs here as much as a select.' However, it does not crisply state 'select database rows' as the primary purpose, and huge amount of surrounding detail makes the core purpose less immediate.

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 usage context: dependent-step queries belong in this read-only command, and pool_file should be used when the pool is too large to write inline. It also warns against placing file outputs under mcp/melbis because it is wiped without warning. It does not explicitly name engine_db_execute or other alternatives, but the read-only positioning is enough to route agents reasonably.

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