Skip to main content
Glama
dockndevai

mcp-clickhouse

Run a read-only query

query
Read-onlyIdempotent

Run read-only ClickHouse queries (SELECT/SHOW/DESCRIBE) to retrieve rows while preventing data modifications. Ideal for schema exploration and analytics with capped results.

Instructions

Run a SELECT/SHOW/DESCRIBE query and return rows. Non-read statements are refused here — use execute (read-write mode) for those. Results are capped at CLICKHOUSE_MAX_ROWS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA single read-only SQL statement

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?

The description adds two behavioral traits beyond the annotations: non-read statements are refused (confirming readOnlyHint=true, no contradiction), and results are capped at CLICKHOUSE_MAX_ROWS — a genuinely useful disclosure the annotations don't carry. With annotations already covering the safety profile (readOnly, non-destructive, idempotent), the added row-cap context earns a solid score, though it doesn't clarify what happens on refusal (e.g., error type).

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?

Three sentences with zero waste: the action and accepted statement types are front-loaded, followed by the read/write exclusion and the result cap. Every sentence earns its place and the ordering prioritizes the most decision-relevant information first.

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 single-required-param tool with 100% schema coverage, no enums, no nested objects, and annotations carrying the safety profile, the description is nearly sufficient: it covers accepted statements, refusal behavior, and the row cap. The minor gap is the exact return shape beyond 'return rows', but given no output schema exists and the use case is generic querying, this is a small omission rather than a blocking one.

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 100%, so the baseline is 3 — the schema already documents `sql` as 'A single read-only SQL statement'. The description adds marginal value by enumerating the accepted statement types (SELECT/SHOW/DESCRIBE), which slightly narrows the schema's generic wording, but this is a minor refinement rather than substantive new semantics.

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 (run) and resource (SELECT/SHOW/DESCRIBE queries) and says it returns rows. It reads clearly as the general-purpose ad-hoc SQL tool among the specialized siblings (list_databases, table_stats, show_create_table, etc.). However, it does not explicitly differentiate why an agent would choose `query` over those specialized siblings — the general-vs-specialized boundary is only implicit.

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?

The description gives an explicit when-not instruction: non-read statements are refused and the agent should use `execute` (read-write mode) instead, which is a clear exclusion with a named alternative. The gap is that it gives no guidance for choosing between this general tool and the specialized sibling tools (e.g., when to prefer `describe_table` or `table_stats` over writing a query), so routing among siblings is left to inference.

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