Skip to main content
Glama
CoraDB MCP Server

CoraDB MCP Server

Official
by apsisware

Show a CoraDB query plan

explain_query
Read-only

Inspect the execution plan CoraDB chooses for one or more SELECT statements without running them, so you can review optimizer behavior before execution.

Instructions

The plan the CoraDB optimizer chooses for a SELECT (or for each SELECT of a script separated by ;), without running it.

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": {
      "sql": "<sql>",
      "database": "<database>"
    },
    "name": "explain_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesOne or more SELECT statements separated by ;.
hostNoCoraDB broker host. Default: localhost.
portNoCoraDB broker port. Default: 33000.
userNoDatabase user. Default: dba.
databaseYesThe database to open.
passwordNoPassword of that user. Default: empty.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=false, and the description adds the genuinely important behavioral fact that the query is not executed — the plan is produced statically. It stays silent on return format (textual plan layout) and on failure behavior for invalid SQL, so it stops short of full disclosure.

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?

A single front-loaded sentence with no filler; the key qualifier ('without running it') closes the sentence rather than being buried. Nothing is wasted.

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?

There is no output schema, and the description covers what the tool returns at a conceptual level (the chosen plan) plus the non-execution guarantee. What remains unstated — the shape/format of the plan text and whether multiple plans are returned for multi-statement scripts — is minor for a read-only explain tool with fully documented parameters.

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 all six parameters (host, port, user, password, database, sql) are already documented, including the ';'-separated script convention. The description restates the SELECT/'/' constraint already present in the schema and adds no new meaning, so baseline 3 applies.

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

Purpose4/5

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

The description names the specific operation (the optimizer's chosen plan for a SELECT) and its scope (each SELECT in a ';'-separated script), which is enough to separate it from execute_select/execute_sql by the 'without running it' clause. It never names a sibling explicitly, so differentiation is inferred rather than stated.

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?

Usage is only implied: 'without running it' suggests you use this when you want the plan rather than results, which hints at execute_select as the alternative. There is no explicit when-to-use/when-not-to-use statement or named alternative, so the agent must infer the routing.

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