Skip to main content
Glama
Midhun-edv

Magento 2 Coding Standards MCP

by Midhun-edv

get_magento_pattern

Find the correct Magento 2 coding pattern for tasks like reading files, escaping HTML, or creating viewmodels. Get compliant code examples and guidance on what to avoid.

Instructions

Get the correct Magento 2 way to accomplish a task. Returns the proper pattern, code example, and what to avoid. Use this for "vibe coding" - writing Magento-compliant code naturally.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesThe task you want to accomplish (e.g., "read a file", "escape HTML", "validate email", "create viewmodel")
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the tool returns patterns, code examples, and what to avoid, which gives some behavioral insight. However, it lacks details on permissions, rate limits, error handling, or response format, which are important for a tool with no annotations and no output schema.

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 concise and front-loaded, with two sentences that efficiently convey purpose and usage. Every sentence adds value: the first states what the tool does, and the second provides context for when to use it, with no wasted words.

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

Completeness3/5

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

Given the tool's moderate complexity (1 parameter, no annotations, no output schema), the description is adequate but has gaps. It covers purpose and usage well, but lacks behavioral details like response format or error handling, which are needed for completeness without annotations or 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 the parameter 'task' well-documented in the schema. The description adds minimal value beyond the schema by implying the task is development-related (e.g., 'escape HTML'), but doesn't provide additional syntax, examples, or constraints. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to get the correct Magento 2 way to accomplish a task, including patterns, code examples, and anti-patterns. It specifies the resource (Magento 2 patterns) and verb (get), but doesn't explicitly differentiate from sibling tools like 'explain_rule' or 'validate_code' which might overlap in domain.

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 provides clear context for when to use this tool: for 'vibe coding' - writing Magento-compliant code naturally. This implies it's for development tasks requiring best practices. However, it doesn't explicitly state when not to use it or name alternatives among siblings, such as when to choose 'validate_code' instead.

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/Midhun-edv/magento2-coding-standards-mcp'

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