Skip to main content
Glama

Run a read-only query

run_query
Read-only

Execute a single read-only GoogleSQL SELECT and return rows as a table; use dry_run to validate and estimate bytes scanned before running. Writes are refused.

Instructions

Run one SELECT in GoogleSQL and return the rows as a table. Writes are refused. Use dry_run to check a query and how many bytes it scans before running it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA single SELECT (or WITH … SELECT) in GoogleSQL
dry_runNoOnly validate and estimate the bytes scanned
max_rowsNo
project_idNoGoogle Cloud project id. Defaults to project_id in the config.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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, but the description adds genuinely new behavioral facts: writes are refused (an error condition the agent must anticipate), the result arrives as a table, and dry_run provides a cost-estimation path before execution. It stops short of mentioning authentication requirements, row-limit truncation behavior, or quota/cost limits.

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?

Two sentences, both front-loaded with the operative clause ('Run one SELECT…', 'Use dry_run…'), and no filler. The write-refusal safety note is short and appropriately placed second.

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?

With no output schema, the description correctly covers the return shape ('rows as a table'), and read-only semantics are covered jointly by annotations and the write-refusal sentence. The remaining hole is max_rows (what happens past the 10000 cap, truncation vs error) and any auth/project-scoping prerequisites.

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?

Schema coverage is 75%, above the low-coverage threshold, so the schema carries most parameter meaning. The description's dry_run sentence largely restates the schema's own 'Only validate and estimate the bytes scanned' and adds nothing about max_rows, the one undocumented parameter (a real gap for controlling result size).

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 one SELECT in GoogleSQL'), the cardinality constraint ('one'), and the return shape ('return the rows as a table'). Nothing in the sibling set (list_*/describe_*/screenshot_*/build_report_link) can be confused with executing an arbitrary query, so the boundary is clear without opening schemas.

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?

It gives a workflow hint ('Use dry_run to check a query and how many bytes it scans before running it') but never says when to reach for run_query versus siblings like list_tables or describe_table, nor any exclusions. Usage is only implied by the tool's function.

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