Skip to main content
Glama

data_query

Destructive

Run a database query on one of your servers — passwordless. It executes the engine's own client on the host over Termalin's keyless tunnel, using the database's local trust (Postgres peer auth via sudo -u postgres, MySQL/MariaDB unix-socket via sudo mysql, redis-cli, mongosh, sqlite3) — so no database password is needed or stored anywhere. Read-only by default: only SELECT/SHOW-style statements run unless allowWrites is set (full-access keys only). SQL engines return CSV/TSV with a header. For MongoDB pass a shell expression, e.g. db.products.find({}).limit(20).toArray().

Input Schema

NameRequiredDescriptionDefault
hostYesServer id from hosts_list
queryYesThe statement / command / expression to run
engineNoDatabase engine on that server (default postgres)
databaseNoDatabase name (for sqlite: the .db file path)
usernameNoSSH login user (defaults to the tunnel's user, else root)
allowWritesNoAllow a non-read statement (full-access keys only; default false)
timeoutSecondsNoMax seconds to wait (default 60). Calls longer than about 90 seconds are usually cut off by the network before they answer — run long jobs in the background instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / timeoutSeconds / description
      Previous value: -"Max seconds to wait (default 60, up to 300)"New value: +"Max seconds to wait (default 60). Calls longer than about 90 seconds are usually cut off by the network before they answer — run long jobs in the background instead."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the passwordless auth path (peer auth via sudo -u postgres, unix-socket for MySQL, redis-cli, mongosh, sqlite3), the write gate and its key-permission requirement, and the practical ~90s network cutoff. Annotations only flag destructive/openWorld; the description explains what actually gets executed and under what constraints.

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

Conciseness4/5

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

A single dense paragraph that is front-loaded with the core action, then auth mechanics, then the read-only default, then output format. Every clause carries information, though the engine-by-engine auth enumeration is slightly list-heavy for a description.

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

Completeness5/5

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

No output schema exists, so the description correctly compensates by stating the return shape per engine (CSV/TSV with header for SQL, array for the MongoDB example). With 7 parameters, two required, and full schema coverage, nothing an agent needs to invoke it correctly is missing.

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 coverage is already 100%, so the baseline is 3, but the description adds real meaning: it clarifies that MongoDB expects a shell expression (with a concrete example), that SQL engines return CSV/TSV with a header, and that allowWrites is gated on key scope. It stops short of documenting host, username, or database formats beyond the schema.

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?

States a specific verb and resource ('Run a database query on one of your servers') and immediately distinguishes itself from the ssh_exec siblings by naming the mechanism it uses (the engine's own client over the keyless tunnel). An agent can tell this is DB-query execution, not generic shell access, without opening the schema.

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?

Gives a clear default posture ('Read-only by default: only SELECT/SHOW-style statements run unless allowWrites is set') and the precondition for writes ('full-access keys only'). It does not explicitly name alternatives (e.g. use ssh_exec for non-DB commands or data_tables to discover tables first), so routing guidance is implied rather than spelled out.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources