Skip to main content
Glama
3281831403

cubrid-mcp-server

by 3281831403

Explain Query

explain_query

Get a CUBRID execution plan for a SELECT or WITH statement to identify full table scans (SEQ SCAN) and optimize query performance with indexes.

Instructions

Return CUBRID's execution plan/trace for a SELECT or WITH statement.

CUBRID uses SHOW TRACE (not standard EXPLAIN). Look for SEQ SCAN in the output — it indicates a full table scan that may benefit from an index. See cubrid://guide/performance for interpretation tips.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
connectionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations present, the description carries the behavioral burden. It usefully discloses that CUBRID uses SHOW TRACE rather than standard EXPLAIN and explains the significance of SEQ SCAN in the output. It could go further by explicitly stating whether the statement is actually executed or whether any side effects occur, but the SELECT/WITH restriction implies a read-only plan/trace operation.

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 compact and front-loaded, with three sentences that each add value: the core purpose, the CUBRID-specific SHOW TRACE caveat, and a practical output interpretation tip. There is no filler or repetition of schema details.

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 covers the tool's core purpose, supported statement types, CUBRID's nonstandard behavior, output interpretation, and a pointer to further interpretation guidance. Given the output schema exists and parameters are simple, this is mostly complete, though the connection parameter lacks explanation and read-only/safety behavior is only implied.

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 description coverage is 0%, so the description must compensate for the parameters. It adds a meaningful semantic constraint on "sql" by requiring a SELECT or WITH statement, but it does not explain the optional "connection" parameter at all, leaving some ambiguity about its purpose and behavior.

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 opens with a specific verb and resource: "Return CUBRID's execution plan/trace" for a SELECT or WITH statement. This clearly identifies what the tool does and distinguishes it from siblings like execute_query by focusing on plans rather than execution results.

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 clear context for use: it is for SELECT or WITH statements and for inspecting execution plans, with guidance to look for SEQ SCAN as a potential index opportunity. It does not explicitly mention which sibling tools to use instead, so it stops short of a full when-to-use/when-not-to-use guide.

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