Skip to main content
Glama
jigarkkarangiya

magento-sql-mcp-server

Execute SELECT Query

execute_select_query
Read-onlyIdempotent

Execute read-only SQL queries against a Magento database with automatic row limiting and masking of sensitive data.

Instructions

Runs a read-only SELECT/SHOW/DESCRIBE/EXPLAIN against the Magento database. Auto-appends LIMIT 100 if missing. Parameter: sql (alias: query). Sensitive columns (password, token, cc_) are masked.

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.
profileNoOverride the MAGENTO_SQL_PROFILE env var for this call only. Use list_connection_profiles to see available names.
magentoRootNoAbsolute path to the Magento root (must contain app/etc/env.php). Defaults to MAGENTO_ROOT env var or auto-discovery.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
rowsYes
sampledNo
rowCountYes
truncatedNo
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, which covers the safety profile. The description adds genuinely useful behavior beyond annotations: the auto-appended LIMIT 100 (prevents unbounded result sets) and the masking of sensitive columns (password, token, cc_). No contradiction between description and annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with no filler. Core purpose is front-loaded, followed by the safety-relevant auto-limit, parameter note, and masking disclosure. Each sentence earns its place. Slightly more verbose than strictly necessary, but efficient for a tool with this much behavioral nuance.

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 raw SQL executor, the description is largely complete: allowed query types, auto-limit, masking behavior, and an output schema are all present. Combined with annotations covering the safety profile and idempotency, an agent has what it needs to invoke the tool and interpret results. Missing only explicit guidance on which sibling to reach for instead, which is covered under usage_guidelines.

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%, so the input schema fully documents all five parameters, including the limit default (100) and hard cap (1000), the query alias, and the profile and magentoRoot overrides. The description adds only marginal value by restating the sql/query alias relationship and referencing the auto-limit. At full coverage, the baseline 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 verb ('Runs') with an explicit resource ('the Magento database') and enumerates the allowed query types (SELECT/SHOW/DESCRIBE/EXPLAIN). This clearly differentiates it from the many specialized sibling tools (find_order_by_increment_id, get_indexer_status, etc.) as the raw SQL executor. No ambiguity about what this tool does.

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

Usage Guidelines2/5

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

The description gives no guidance on when to prefer this tool over its 46+ siblings, such as validate_select_query or explain_select_query. There is no when/when-not language or alternative routing. It's implied that this is for ad-hoc queries not covered by specialized finders, but that is left entirely to inference.

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