Skip to main content
Glama

Query Database (Read-Only)

query_database
Read-only

Run a READ-ONLY SQL query against the project's Postgres database (SELECT, EXPLAIN, etc.). Writes are rejected — use execute_sql for those. Returns JSON: {rows, rowCount, command, truncated?} (or {results: [...]} for multi-statement queries). Pass database only if the project has more than one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
databaseNo
projectIdYes

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description is not required to repeat safety. It adds value by disclosing the return format ('Returns JSON: {rows, rowCount, command, truncated?}'), multi-statement behavior ('{results: [...]}'), and explicitly restating write rejection, going beyond the annotations.

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?

The description is a single, efficient sentence that front-loads the core purpose ('Run a READ-ONLY SQL query') and packs all essential information without redundancy. Every clause earns its place, including return format and parameter guidance.

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?

For a SQL query tool, the description covers all needed aspects: read-only nature, write rejection with the alternative, return format (including multi-statement variant), and the database parameter condition. There is no output schema, so the return description fills that gap. Nothing critical is missing for an agent to invoke the tool correctly.

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?

With schema coverage at 0%, the description compensates by explaining that query is a SQL statement and database is optional with a specific condition for when to pass it. Although projectId is not explicitly described, it is a standard identifier and its purpose is implied. The description adds meaningful semantics to parameters beyond the bare 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?

The description states a specific verb and resource: 'Run a READ-ONLY SQL query against the project's Postgres database'. It also explicitly differentiates from the sibling execute_sql by noting 'Writes are rejected — use execute_sql for those', making the purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear guidance on when to use this tool versus the alternative: 'Writes are rejected — use execute_sql for those'. It also provides conditional usage for the database parameter: 'Pass database only if the project has more than one', which is explicit and actionable.

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.

TDQS

A3.6/5.0
Disambiguation4/5

Tools are mostly distinct, but there is some overlap among file-modifying tools (edit_file, write_file, apply_patch) and between run_code_in_vm and run_code_in_browser. Detailed descriptions and clearly scoped use cases help agents select correctly.

Naming Consistency4/5

Most tools follow a verb_noun snake_case pattern (create_project, list_files, execute_sql), but a few deviate (apply_patch, card_upload_asset, run_code_in_vm). Overall readable and predictable, with only minor inconsistencies.

Tool Count2/5

With 46 tools, the server exceeds the typical well-scoped range and approaches the extreme threshold. While the broad scope of a full development platform justifies many tools, this count may overwhelm agents and increase misselection risk.

Completeness4/5

The tool surface covers the full development lifecycle: project creation, file operations, database management, resource provisioning, deployment, testing, and debugging. Minor gaps exist (e.g., no delete_project or checkpoint management), but core workflows are well-supported.

Resources