Skip to main content
Glama
jvanvalkenhoef

clickhouse-mcp

query

Execute read-only SQL against ClickHouse to investigate telemetry: group by time, aggregate, join logs/metrics/traces, and spot anomalies. Results are capped to keep agent context small.

Instructions

Run a read-only SQL query against ClickHouse (SELECT/WITH/SHOW/DESCRIBE/EXPLAIN only). Results are capped to keep the agent's context small. Use it to investigate telemetry: group by time, aggregate, find anomalies, join logs/metrics/traces. Add LIMIT on big tables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesRead-only SQL.
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosing behaviors. It states the tool is read-only, enumerates allowed statement types, and notes that results are capped to keep context small. This gives the agent essential safety and performance expectations, though it omits details like error handling for non-read-only queries.

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 composed of three concise sentences, immediately stating the purpose then adding safety and usage guidance. Every sentence provides value without redundancy or filler.

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-parameter query tool with no output schema, the description adequately covers purpose, read-only scope, result size behavior, and intended use cases. It does not specify the return format or behavior on invalid SQL, but these are less critical given the tool's simplicity and strong safety framing.

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?

The schema parameter description is minimal ('Read-only SQL'), but the tool description expands on this by specifying allowed statement types and advising LIMIT usage on large tables. This adds meaningful context beyond the schema, making it easier to construct correct queries.

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 clearly states that the tool runs read-only SQL queries against ClickHouse, enumerating allowed statement types (SELECT/WITH/SHOW/DESCRIBE/EXPLAIN). This distinguishes it from sibling tools like list_databases and sample_rows, which cover more specific discovery operations.

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 provides explicit use cases for telemetry investigation: grouping by time, aggregating, finding anomalies, and joining logs/metrics/traces. It also gives practical advice to add LIMIT on big tables. It does not explicitly mention when to avoid this tool in favor of siblings, but the context is sufficient for most scenarios.

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

Install Server

Other Tools

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/jvanvalkenhoef/mcp_server_clickhouse'

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