Skip to main content
Glama
sepfazeli

clickhouse-mcp-server

by sepfazeli

Run Query

run_query
Read-only

Execute read-only SQL queries like SELECT, SHOW, DESCRIBE on a ClickHouse database. Results are cached for 60 seconds with a maximum row limit of 1000.

Instructions

Execute a read-only SQL query against ClickHouse. Only SELECT, WITH (CTE), SHOW, DESCRIBE, EXISTS, and EXPLAIN statements are allowed. Results are cached for 60s. A maximum row limit of 1000 is enforced (or lower if scoped).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe SQL query to execute. Must be a read-only statement.
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds important behavioral details: a 60-second cache and a 1000-row limit, which go beyond the annotations and provide useful constraints.

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 two sentences long, with the main action front-loaded. Every sentence provides essential information without 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?

Given the tool has a single string parameter and no output schema, the description covers constraints (allowed statements, caching, row limits) adequately. It could optionally mention the return format, but the current level is sufficient for typical use.

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 input schema covers the only parameter 'query' with a description stating it must be read-only. The tool description adds further specificity by enumerating which statement types are allowed (SELECT, WITH, SHOW, etc.), thus adding meaning beyond the 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 clearly states the tool executes read-only SQL queries against ClickHouse and lists specific allowed statement types (SELECT, WITH, SHOW, etc.), which is a specific verb+resource combination that distinguishes it from siblings like describe_table or list_tables.

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?

The description lists allowed statement types but does not explicitly guide when to use this tool versus its siblings (e.g., describe_table). The guidance is implicit rather than explicit.

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/sepfazeli/clickhouse-mcp-server'

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