Skip to main content
Glama
elgentos

Magento 2 Development MCP Server

by elgentos

Store List

sys-store-list

Retrieve a complete list of Magento 2 stores, websites, and store views in table, JSON, or CSV format for development and system management purposes.

Instructions

List all Magento 2 stores, websites, and store views

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput formattable

Implementation Reference

  • The handler function for the 'sys-store-list' tool. It runs the 'magerun2 sys:store:list' command with the specified format (table, json, csv), handles errors, and returns formatted output.
    async ({ format = "table" }) => {
      const command = `magerun2 sys:store:list --format=${format}`;
      const result = await executeMagerun2Command(command, format === "json");
    
      if (!result.success) {
        return {
          content: [{
            type: "text",
            text: result.error
          }],
          isError: true
        };
      }
    
      const responseText = format === "json"
        ? `Store list (${format} format):\n\n${JSON.stringify(result.data, null, 2)}`
        : `Store list (${format} format):\n\n${result.data}`;
    
      return {
        content: [{
          type: "text",
          text: responseText
        }]
      };
    }
  • Input schema for the tool defining the 'format' parameter as an enum with values 'table', 'json', 'csv', defaulting to 'table'.
    inputSchema: {
      format: z.enum(["table", "json", "csv"])
        .default("table")
        .describe("Output format")
    }
  • src/index.ts:1161-1197 (registration)
    Registration of the 'sys-store-list' tool via server.registerTool, including title, description, input schema, and the handler function.
    server.registerTool(
      "sys-store-list",
      {
        title: "Store List",
        description: "List all Magento 2 stores, websites, and store views",
        inputSchema: {
          format: z.enum(["table", "json", "csv"])
            .default("table")
            .describe("Output format")
        }
      },
      async ({ format = "table" }) => {
        const command = `magerun2 sys:store:list --format=${format}`;
        const result = await executeMagerun2Command(command, format === "json");
    
        if (!result.success) {
          return {
            content: [{
              type: "text",
              text: result.error
            }],
            isError: true
          };
        }
    
        const responseText = format === "json"
          ? `Store list (${format} format):\n\n${JSON.stringify(result.data, null, 2)}`
          : `Store list (${format} format):\n\n${result.data}`;
    
        return {
          content: [{
            type: "text",
            text: responseText
          }]
        };
      }
    );
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 of behavioral disclosure. It states it's a list operation, implying read-only behavior, but doesn't mention any constraints like permissions, rate limits, or what the output includes beyond the resource types. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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 low complexity (1 optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on output format or behavioral traits, which would be helpful for an agent to use it effectively in context with siblings.

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?

The input schema has 100% description coverage, documenting the 'format' parameter with its enum values and default. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without extra value.

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 verb ('List') and resource ('Magento 2 stores, websites, and store views'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'sys-website-list' or 'sys-store-config-base-url-list', which appear to list similar resources, so it doesn't reach the highest score.

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 provides no guidance on when to use this tool versus alternatives. Given sibling tools like 'sys-website-list' and 'sys-store-config-base-url-list' that might overlap in functionality, the lack of explicit usage context or exclusions leaves the agent without clear direction.

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/elgentos/magento2-dev-mcp'

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