Skip to main content
Glama

Run SQL

run_sql
Read-only

Run one read-only ClickHouse SELECT on tiktok.* and get the rows back (at most 100 per request; 10 s per query). Name the columns you need and add a LIMIT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesOne ClickHouse SELECT, e.g. SELECT username, followers FROM tiktok.creators WHERE country = 'US' ORDER BY followers DESC LIMIT 10

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYesOne array per row, values in the order of columns
cappedYestrue when the result was cut at the 100-row limit
columnsYes
rows_readYes
elapsed_msYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds valuable non-annotation behavior: a 100-row cap per request, a 10-second query timeout, and enforced read-only SELECT-only execution. It does not address error behavior or what happens on non-SELECT input, keeping it short of a 5.

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?

A single tight sentence, front-loaded with the operation and scope, then the limits, then the authoring guidance. No filler or redundancy.

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 an output schema present, return-value explanation is unnecessary, and annotations cover the safety profile. The description supplies the operational limits an agent needs to call it correctly, though it is silent on failure modes (e.g., non-SELECT input, timeout errors) for a query-execution 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%, so the baseline is 3, but the description adds real semantics beyond the schema: the SQL must be exactly one SELECT statement, should name explicit columns, and should carry a LIMIT. That meaningfully constrains how the single 'sql' parameter is composed.

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 names a specific verb (Run), resource (ClickHouse SELECT on tiktok.*), and scope constraint (read-only), which cleanly distinguishes it from siblings describe_table, list_tables, and examples. An agent knows immediately this executes a query rather than describing or listing 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?

It gives clear context for use ('Name the columns you need and add a LIMIT') and implicitly contrasts with schema-discovery siblings, but never explicitly states when to prefer describe_table or list_tables first. The operating limits (100 rows, 10 s) further frame appropriate use.

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.