Skip to main content
Glama
jigarkkarangiya

magento-sql-mcp-server

Get URL Rewrite

get_url_rewrite
Read-onlyIdempotent

Search URL rewrite records by path pattern to retrieve entity type, ID, store, and redirect type. Debug 404s, duplicate URLs, or redirect loops directly from the Magento database.

Instructions

Searches url_rewrite by request_path or target_path pattern. Returns entity_type, entity_id, store_id, redirect_type. Use to debug 404s, duplicate URLs, or redirect loops.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.
path_patternYesURL path pattern (SQL LIKE) for request_path or target_path (e.g. 'my-product.html', '%/checkout%').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
rowsYes
sampledNo
rowCountYes
truncatedNo
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint false, covering safety behavior. The description adds the return fields and the pattern-matching semantics, which is useful but not extensive. It does not contradict the annotations and provides some extra context (e.g., that it searches by pattern).

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, no unnecessary words. The first sentence states the verb, resource, and matching behavior; the second lists return fields and use cases. Information is front-loaded and every clause earns its place.

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 the presence of an output schema, the description need not explain return structures. It covers the purpose, return fields, and typical scenarios. For a read-only search tool with strong annotations and full schema coverage, nothing critical is missing. It could have mentioned pattern breadth or pagination, but those are minor and likely covered by the output schema.

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 description coverage is 100%, with all parameters fully documented (path_pattern includes example and SQL LIKE semantics, profile and magentoRoot have clear explanations). The tool description adds the concept of matching both request_path and target_path, but this is already explicit in the schema. Thus the description adds little beyond the structured documentation, warranting the baseline 3.

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 ('Searches') and resource ('url_rewrite'), plus the fields returned. It clearly defines the tool's function and distinguishes it from the many get_* siblings by naming the target table and its purpose (debugging 404s, duplicate URLs, redirect loops).

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 lists three concrete debugging scenarios ('404s, duplicate URLs, or redirect loops') where the tool should be used. It does not state when not to use it or name alternatives, but the context is clear enough for an agent to select it appropriately among the sibling tools.

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