Skip to main content
Glama
aradhyas8
by aradhyas8

query

Run read-only SELECT, WITH, VALUES, TABLE, or SHOW against PostgreSQL to inspect runtime state safely; results are bounded and sensitive values redacted.

Instructions

Run one read-only SQL statement (SELECT, WITH, VALUES, TABLE, SHOW) against PostgreSQL. Runs in a read-only transaction that is always rolled back, with server-side timeouts. Results are bounded: has_more means more rows existed (truncated_by says whether the row cap or byte budget stopped retrieval), and long values are cut with a …[+size] marker. Columns with sensitive-looking names (password, token, api_key, ...) come back as [redacted], counted in columns_redacted and values_redacted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA single read-only SQL statement

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYes
columnsYes
has_moreYes
warningsNo
row_countYes
duration_msYes
truncated_byYes
values_redactedYes
columns_redactedYes
values_truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 behavioral burden and does so well: read-only transaction that is always rolled back, server-side timeouts, bounded result sets with has_more/truncated_by semantics, truncation markers on long values, and redaction of sensitive-looking columns with counters. Gaps remain around error behavior, actual timeout values, and permission requirements, so it falls short of exhaustive.

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?

Four dense sentences, each carrying distinct operational information (allowed statements, transaction semantics, result bounding, redaction), with the core purpose front-loaded. No filler or restatement of the tool name.

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?

The description covers the safety model, execution semantics, and the noteworthy return conventions (truncation and redaction) even though an output schema exists, so an agent can call and interpret this tool without surprises. The only real omissions are error/timeout specifics, which are minor for a single-parameter read tool.

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 100% and there is only one required parameter, so the schema already documents 'sql'. The description nonetheless adds real meaning beyond the schema by constraining it to a single read-only statement and listing the legal statement keywords, which tells the agent what the string may contain.

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 states a specific verb and resource ('Run one read-only SQL statement ... against PostgreSQL') and enumerates the accepted statement forms (SELECT, WITH, VALUES, TABLE, SHOW), which is far more precise than the bare name 'query'. It does not, however, explicitly contrast itself with the schema-inspection siblings (list_tables, describe_tables, inspect_row), so differentiation is left implicit.

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?

Usage is implied: an agent can infer this is the tool for arbitrary read queries while the siblings handle table discovery and row inspection. But there is no explicit when-to-use/when-not guidance, no mention that schema exploration should go through list_tables/describe_tables first, and no note that only a single statement is permitted (which the description only hints at with 'one ... statement').

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

Deploy Server

Other Tools