Skip to main content
Glama
ThinAirTelematics

ThinAir Data

Official

explain_query

Analyze SQL query execution plans and receive plain-English performance recommendations. Supports PostgreSQL and MySQL.

Instructions

Analyze a SQL query's execution plan and return plain-English performance recommendations. Runs EXPLAIN ANALYZE (Postgres) or EXPLAIN FORMAT=JSON (MySQL). [BUILD tier]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Definition and registration of the 'explain_query' tool in the static TOOLS array. It's a BUILD tier tool described as analyzing a SQL query's execution plan and returning plain-English performance recommendations. The inputSchema is a generic { type: 'object' } with no specific field validation.
    // BUILD tier
    {
      name: "explain_query",
      description:
        "Analyze a SQL query's execution plan and return plain-English performance recommendations. Runs EXPLAIN ANALYZE (Postgres) or EXPLAIN FORMAT=JSON (MySQL). [BUILD tier]",
      inputSchema: { type: "object" },
  • bin/server.js:188-188 (registration)
    Tool registration via ListToolsRequestSchema handler. All tools in the TOOLS array (including explain_query) are returned as the tool catalog.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
  • Generic redirect handler for all tools. Since bin/server.js is only a local reference adapter (not the real execution server), this handler returns a static redirect message for all tools including explain_query rather than executing the actual logic. The real execution would happen at the hosted server https://data.thinair.co/mcp.
    server.setRequestHandler(CallToolRequestSchema, async () => ({
      content: [{ type: "text", text: REDIRECT_MESSAGE }],
      isError: false,
    }));
Behavior4/5

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

With no annotations, the description reveals database-dependent behavior (different EXPLAIN commands) and that it returns plain-English recommendations. It does not state if it modifies data or requires permissions, but the core behavior is well disclosed.

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?

Two sentences with zero wasted words. Key information is front-loaded. The '[BUILD tier]' note adds context without clutter.

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?

Given moderate complexity and no output schema, the description adequately covers purpose and output (plain-English recommendations). However, it omits input structure and whether a connection is required, slightly reducing completeness.

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?

The input schema has no parameters, leaving the object content ambiguous. The description mentions analyzing a 'SQL query' but fails to clarify how the query is provided or if other fields (e.g., connection) are needed. Baseline for zero params is 4, but this gap reduces the score.

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 clearly states it analyzes a SQL query's execution plan and returns plain-English performance recommendations. It specifies database-specific EXPLAIN commands (Postgres vs MySQL), distinguishing it from sibling tools like 'optimize_query'.

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 description implies usage for query analysis with mention of database types but lacks explicit when-to-use or when-not-to-use guidance compared to alternatives. No prerequisites or constraints are mentioned.

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/ThinAirTelematics/thinair-data'

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