Skip to main content
Glama
zeluizr

Adobe Commerce MCP

Add a controller and route

add-controller
Read-onlyIdempotent

Generate routes.xml plus GET page or POST JSON controller files, with layout handle, template, and Admin ACL for frontend or adminhtml modules. Returns files for you to write.

Instructions

Generate routes.xml, an action controller (GET page or POST JSON) and, for pages, the layout handle and template, for the frontend or adminhtml area (with ADMIN_RESOURCE and acl.xml for the Admin), adapted from the official routing docs. Returns the files for the caller to write.

Input Schema

NameRequiredDescriptionDefault
areaYesfrontend (storefront) or adminhtml (Admin)
titleNoPage title for GET actions
actionNoAction class (default "Index")
methodNoHTTP method: GET renders a page with a layout handle, POST returns JSON (default GET)
moduleYesModule name as Vendor_Module (e.g. "Acme_Reviews"), as registered in registration.php
routeIdNoRoute id in routes.xml and first part of the layout handle (default: frontName)
basePathNoModule directory relative to the Commerce root (default "app/code/<Vendor>/<Module>")
frontNameYesURL front name: the first URL segment, <frontName>/<controller>/<action> (e.g. "reviews")
controllerNoController folder (default "Index")
aclResourceNoadminhtml only: ACL resource for ADMIN_RESOURCE (default "<Vendor_Module>::<controller>")

Output Schema

NameRequiredDescriptionDefault
filesYesFiles to write. The server never writes to disk.
notesYesNext steps and caveats

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

The description valuably reconciles with readOnlyHint=true by stating the tool returns the files "for the caller to write" rather than mutating the filesystem itself — that is exactly the clarification an agent needs. It also discloses the adminhtml-specific extras. It does not say what happens when target files already exist (idempotentHint implies regeneration, but the overwrite behavior is unstated).

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, front-loaded with the verb and the full artifact list, followed by the critical return-value note. No filler; every clause carries information an agent needs.

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?

An output schema exists, so return structure need not be described, and the schema is fully documented. What is missing is prerequisite context (module existence, overwrite behavior on re-invocation) that matters for a scaffolding tool with 10 parameters.

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% and every parameter carries its own description and defaults, so the schema does the heavy lifting. The description adds a little context — GET yields a layout handle, POST yields JSON, adminhtml adds ACL — but nothing beyond what the schema already says. Baseline 3 applies.

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?

Specific verb ("Generate") plus an enumerated set of artifacts: routes.xml, action controller, layout handle/template, ADMIN_RESOURCE and acl.xml. It clearly scopes the frontend vs adminhtml outputs, so an agent knows exactly what will be produced. It stops short of differentiating itself from siblings like scaffold-module or add-plugin, which is the only thing keeping it from a 5.

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

Usage Guidelines3/5

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

Usage is only implied by the artifact list; there is no explicit "use this when…" or "do not use this if…" and no mention of the prerequisite that the module must already exist (scaffold-module). The GET/POST and area distinctions are useful signals but they are parameter semantics, not usage routing.

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