Skip to main content
Glama
mengqi1436

GaussDB-MCP

by mengqi1436

explain_query

Read-only

Explain SQL execution plans, optionally execute to gauge real runtime. Automatic rollback ensures write statements leave no data changes.

Instructions

查看 SQL 执行计划。analyze=true 时真实执行并统计耗时(自动包裹事务回滚,写语句不落盘)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes要分析的 SQL
analyzeNo是否真实执行(EXPLAIN ANALYZE),默认 false
Behavior5/5

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

The description explicitly discloses a critical behavior beyond annotations: when analyze=true, the tool actually executes the SQL, times it, automatically wraps in a transaction with rollback, and ensures write statements are not persisted. This enriches the readOnlyHint annotation and provides valuable safety context.

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 a single, front-loaded sentence in Chinese with a parenthetical detail. Every word earns its place, with no 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?

The description is sufficient for a low-complexity tool. It does not describe the output format, but for an explain plan tool, this is generally implied. No output schema exists, but the core purpose is clear. Minor gap around return values.

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 baseline is 3. The description enriches the analyze parameter by explaining the transactional rollback and non-persistence behavior, adding meaning beyond the schema's brief description. The sql parameter is self-evident.

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 uses specific verb '查看' (view) and resource 'SQL 执行计划' (SQL execution plan), clearly distinguishing it from execution tools like query and execute. It also mentions the analyze option, further clarifying scope.

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 clear context: it's for viewing execution plans, with analyze=true enabling real execution and timing. It does not explicitly name alternatives or exclusion criteria, but the sibling set makes it obvious when to use this tool over query or execute.

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/mengqi1436/GaussDB-MCP'

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