Skip to main content
Glama

Validate SQL

explain
Read-only

Validate a SQL query against decoded EVM contract events without executing it. Checks tables, columns and types, returning valid confirmation or an error with a fix hint before you run the query.

Instructions

Validate a SQL query over this nest's decoded EVM contract events WITHOUT executing it - binds tables/columns/types and returns {valid:true} or an error with a fix hint. Cheaper than sql; use it to check a query before 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": {
      "query": "<query>"
    },
    "name": "explain"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesA SELECT or WITH query to validate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.21.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the description's key contribution is the no-execution guarantee and the specific binding behavior (tables/columns/types). It also discloses the return shape ({valid:true} or an error with a fix hint), which matters because there is no output schema. It stops short of saying whether a passing validation guarantees successful execution or any cost/rate-limit specifics.

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?

One front-loaded sentence with the core semantics, followed by a short routing clause naming the alternative. No filler, and the no-execution constraint is placed early where it matters most.

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

Completeness5/5

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

For a one-parameter validation tool with no output schema, the description covers the mechanism (static binding of tables/columns/types), the return contract, and the relationship to `sql`. Nothing an agent needs to call it correctly is missing.

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?

There is a single parameter with 100% schema description coverage already stating 'A SELECT or WITH query to validate.' The description adds nothing about parameter syntax or constraints beyond that, so the baseline of 3 applies.

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?

States a specific verb (validate) and resource (a SQL query over decoded EVM contract events) and immediately distinguishes itself from the sibling `sql` tool by naming it. An agent can tell what this does and what it is not without opening the schema.

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

Usage Guidelines5/5

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

Explicitly says to use it to check a query before running it, and names the alternative (`sql`) plus the tradeoff (cheaper). The when-to-use and the alternative-and-why are both stated rather than inferred.

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