Skip to main content
Glama

run_readonly_query

Run read-only SQL SELECT or WITH queries to retrieve rows from PostgreSQL without modifying data. Safely inspect schema and query information through MCP.

Instructions

Execute a single read-only SELECT or WITH query and return its rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavior: the operation is read-only and returns query rows. It doesn't cover permissions, dialects, limits, or error behavior, but the core safety-relevant trait is explicit.

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?

One sentence with no filler; the operative verb and key constraints ('read-only', 'single', 'SELECT or WITH') come first and the result is stated.

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 one-parameter tool with an output schema, the description captures the input constraint and the output shape. It doesn't need to restate the schema's return format. The main gap is no explicit sibling-selection guidance, but that is already accounted for under usage guidelines.

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?

The schema's query parameter has no description, so the description must compensate. It adds meaning by restricting the string to a single read-only SELECT or WITH query, but it gives no syntax hints, examples, or statement-termination expectations.

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 an explicit action ('Execute') and a constrained resource ('single read-only SELECT or WITH query'), plus the result ('return its rows'). It doesn't name sibling tools, but the read-only SELECT/WITH restriction helps an agent distinguish it from execute_generated_query.

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 description implies usage for read-only query execution, but never states when to prefer this over execute_generated_query, generate_query, or not to use it. There are no explicit alternatives or exclusion conditions.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/eastonjeff/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server