Skip to main content
Glama
alyiox

mcp-clickhousex

by alyiox

analyze_query

Read-only

Explain ClickHouse SELECT queries to get query execution plan, pipeline, and syntax analysis. Supports read-only statements with optional profile and database settings.

Instructions

[ClickHouse] Explain read-only SELECT or WITH … SELECT.

Returns plan, pipeline, and/or syntax text. Default types plan and pipeline. Uses query timeout and optional database; no max-rows cap unlike run_query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesRead-only SELECT or WITH … SELECT for EXPLAIN. One statement; same validation as run_query.
typesNoEXPLAIN variants: plan (indexes), pipeline, syntax. Default plan and pipeline if omitted.
profileNoProfile name; uses default profile when omitted. Src: profiles.
databaseNoSession default database for unqualified names. Src: databases.
parametersNoNamed parameters for driver placeholders (e.g. %(name)s or {name:Type}).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
planNoEXPLAIN PLAN output.
syntaxNoEXPLAIN SYNTAX output.
pipelineNoEXPLAIN PIPELINE output.
Behavior5/5

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

Description adds behavioral context beyond readOnlyHint and openWorldHint annotations, such as query timeout, optional database, and the absence of max-rows cap. No contradiction.

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 concise sentences, front-loaded with core purpose, and each sentence provides distinct 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 output schema existence and high parameter coverage, description covers key aspects: purpose, defaults, and comparison. Minor missing details like timeout value are acceptable.

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%, but description adds value by specifying default types (plan and pipeline) and mentioning query timeout, which is not in schema. Slight improvement over baseline.

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?

Description clearly states the tool performs EXPLAIN on read-only SELECT/WITH SELECT, returning plan/pipeline/syntax. Distinguishes from sibling run_query by noting no max-rows cap.

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?

Provides context on when to use (for EXPLAIN) and comparison to run_query. Implicitly limits to read-only queries but lacks explicit alternatives for DDL or other analysis tools.

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/alyiox/mcp-clickhousex'

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