Skip to main content
Glama
IBM watsonx.data MCP Server

IBM watsonx.data MCP Server

Official
by IBM

Explain Analyze Query

explain_analyze_query

Analyze SQL query execution statistics in IBM watsonx.data to diagnose performance and troubleshoot failures using Presto or Prestissimo engines.

Instructions

Get detailed query analysis with execution statistics in watsonx.data.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "engine_id": "<engine_id>",
      "statement": "<statement>"
    },
    "name": "explain_analyze_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
verboseNoInclude detailed statistics
engine_idYesPresto or Prestissimo engine identifier
statementYesSQL query to analyze. If query fails, consider using fully qualified table names (catalog.schema.table)
engine_typeNoEngine type - "presto" or "prestissimo" (default: "presto")presto

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.5
    • addedInput schema / properties / engine_id / description
      Added value: +"Presto or Prestissimo engine identifier"
    • addedInput schema / properties / engine_type / description
      Added value: +"Engine type - \"presto\" or \"prestissimo\" (default: \"presto\")"
    • addedInput schema / properties / statement / description
      Added value: +"SQL query to analyze. If query fails, consider using fully qualified table names (catalog.schema.table)"
    • addedInput schema / properties / verbose / description
      Added value: +"Include detailed statistics"
  2. First observedv0.1.4

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden and falls short. The key behavioral trait of an EXPLAIN ANALYZE operation — that the statement is actually executed, incurring real engine time and cost — is not disclosed at all. Nothing is said about permissions, engine state requirements, or the risk of running an expensive query.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short sentence with no padding, and the distinguishing detail (execution statistics) is front-loaded. It is efficient, but the brevity comes at the cost of substance rather than being tight around genuinely complete content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists and parameters are fully documented in the schema, so return values and inputs need not be explained. What is missing is the behavioral layer: the fact that the query is executed and how this differs from explain_query. For a potentially costly analysis tool with zero annotations, that gap matters.

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 100%, so the schema already documents engine_id, statement, engine_type, and verbose. The description adds no meaning beyond that — for instance, it does not explain what verbose actually toggles or clarify the presto vs prestissimo choice. Baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Get detailed query analysis with execution statistics" names a resource and an output flavor, so the agent knows this returns stats rather than a bare plan. However, it never differentiates itself from the sibling explain_query, which is the exact ambiguity an agent faces here. The verb "Get" is generic and the purpose only becomes concrete by inference from the word "statistics".

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance. With explain_query as a sibling, the agent is given no signal about which to pick or what prerequisites (running engine, permissions) apply. The only usage hint lives in the schema's statement description, not the tool description.

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