Skip to main content
Glama
jigarkkarangiya

magento-sql-mcp-server

Validate SELECT Query

validate_select_query
Read-onlyIdempotent

Validate SQL as read-only and safe to execute, returning normalized SQL with auto LIMIT preview to inspect results before running on large tables.

Instructions

Validates SQL is read-only and safe to execute without running it. Returns normalized SQL with auto LIMIT preview for SELECT statements. Use before execute_select_query on large or unfamiliar tables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlNoRead-only SQL starting with SELECT, SHOW, DESCRIBE, or EXPLAIN. Alias: query.
limitNoMax rows to return for SELECT queries. Defaults to 100. Hard cap: 1000.
queryNoAlias for sql — same parameter, alternative name.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validYes
reasonNo
normalizedSqlNo
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the description does not need to restate safety. It adds valuable behavioral context: that it runs without executing, and that it auto-appends a LIMIT preview to SELECT statements. This goes beyond the annotations and gives the agent a clear expectation of side-effect-free, non-mutating validation with a normalized output format. No contradictions to annotations.

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?

The description is two sentences, tightly written with no filler. It front-loads the primary purpose (validation without execution), immediately follows with the key output detail (normalized SQL with auto LIMIT), and ends with a specific usage directive. Every word earns its place; it is concise without sacrificing informative value.

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 validation tool with a rich output schema (present) and comprehensive safety annotations, the description covers the essential context: what it does, what it returns, and when to use it. The agent can correctly decide to invoke it before execute_select_query and can infer the input (SQL string). Given the output schema and annotations cover the remaining details, nothing critical 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?

Schema coverage is 100% — every parameter (sql, limit, query) has a descriptive schema entry that covers meaning and constraints. The description's mention of 'auto LIMIT preview' reinforces the limit parameter's role but does not add new details beyond what the schema already provides. Since the schema fully documents the parameters, the description need not compensate, and the baseline of 3 is appropriate.

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 states a specific action (validates SQL is read-only and safe to execute without running it), identifies the resource (SQL queries), and describes the primary output (normalized SQL with auto LIMIT preview). It distinguishes itself from execute_select_query by explicitly positioning itself as a pre-execution safety check, and from explain_select_query (which likely explains query plans) by focusing on validation. The verb-resource pairing is unique and clear.

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

Usage Guidelines4/5

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

The description explicitly says to use this tool before execute_select_query on large or unfamiliar tables, providing a clear context and a specific sibling to pair with. It does not mention when not to use it or alternative tools like explain_select_query, but the primary use case is well articulated. The guidance is actionable and differentiated from execute_select_query, though it leaves some room for clarifying exclusions.

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/jigarkkarangiya/magento-sql-mcp-server'

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