Skip to main content
Glama

devanvil_explain_sql

Analyze PostgreSQL EXPLAIN JSON or SQLite EXPLAIN QUERY PLAN output offline to compute exclusive node times and detect bottlenecks like sequential scans, disk sorts, and cardinality drift.

Instructions

Analyze PostgreSQL EXPLAIN (ANALYZE, FORMAT JSON) or SQLite EXPLAIN QUERY PLAN output offline to compute exclusive node times and detect bottlenecks (Seq Scan, Disk Sort, Cardinality Drift).

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": {
      "input": "<input>"
    },
    "name": "devanvil_explain_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesPostgreSQL EXPLAIN JSON or SQLite EXPLAIN QUERY PLAN text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It discloses that analysis is offline and enumerates the bottleneck classes it detects, but says nothing about the response shape, whether partial/truncated EXPLAIN input is tolerated, or limitations such as unsupported engines or the fact that the ANALYZE variant implies the query already ran.

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 that packs the supported engines, required input formats, computed metric, and detected bottleneck categories with no filler. Nothing is repeated or 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?

For a one-parameter analysis tool with no output schema, the description is nearly sufficient: it conveys input formats and hints at the returned findings. The remaining gap is that without an output schema, the exact result structure is only loosely sketched rather than specified.

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 coverage is 100% and the single 'input' parameter is already documented as 'PostgreSQL EXPLAIN JSON or SQLite EXPLAIN QUERY PLAN text'. The description restates the same accepted formats without adding syntax, size, or format-conversion guidance, so the baseline of 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?

States a specific verb ('Analyze') and resource ('PostgreSQL EXPLAIN (ANALYZE, FORMAT JSON) or SQLite EXPLAIN QUERY PLAN output') and names the concrete outputs it produces (exclusive node times, Seq Scan / Disk Sort / Cardinality Drift detection). The subject matter is clearly distinct from siblings like devanvil_cron_explain or devanvil_analyze_logs, though the description never explicitly contrasts itself with them.

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?

The word 'offline' implies the input is captured text rather than a live database connection, which is useful selection context. However, there is no explicit when-to-use/when-not-to-use guidance and no named alternative for cases like live query profiling, so usage is only implied.

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