Skip to main content
Glama
elgentos

Magento 2 Development MCP Server

by elgentos

Store Config Base URL List

sys-store-config-base-url-list

Retrieve and display all base URL configurations for Magento 2 stores to manage site access points and verify correct storefront URLs across development environments.

Instructions

List all base URLs for Magento 2 stores

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput formattable

Implementation Reference

  • Handler function that executes the `magerun2 sys:store:config:base-url:list` command based on the provided format (table, json, csv), processes the result using executeMagerun2Command, and returns formatted content or an error response.
    async ({ format = "table" }) => {
      const command = `magerun2 sys:store:config:base-url: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"
        ? `Base URL list (${format} format):\n\n${JSON.stringify(result.data, null, 2)}`
        : `Base URL list (${format} format):\n\n${result.data}`;
    
      return {
        content: [{
          type: "text",
          text: responseText
        }]
      };
    }
  • Tool metadata including title, description, and inputSchema defining the optional 'format' parameter with enum values table/json/csv defaulting to table.
    {
      title: "Store Config Base URL List",
      description: "List all base URLs for Magento 2 stores",
      inputSchema: {
        format: z.enum(["table", "json", "csv"])
          .default("table")
          .describe("Output format")
      }
    },
  • src/index.ts:1247-1283 (registration)
    Registration of the tool using server.registerTool, including the tool name, schema/metadata, and inline handler function.
    server.registerTool(
      "sys-store-config-base-url-list",
      {
        title: "Store Config Base URL List",
        description: "List all base URLs for Magento 2 stores",
        inputSchema: {
          format: z.enum(["table", "json", "csv"])
            .default("table")
            .describe("Output format")
        }
      },
      async ({ format = "table" }) => {
        const command = `magerun2 sys:store:config:base-url: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"
          ? `Base URL list (${format} format):\n\n${JSON.stringify(result.data, null, 2)}`
          : `Base URL 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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it lists base URLs but does not cover aspects like read-only vs. destructive behavior, authentication needs, rate limits, or output format details beyond the schema. This leaves significant gaps for a tool with potential system interactions.

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 unnecessary words. It is front-loaded and wastes no space, making it highly concise and well-structured.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It does not explain behavioral traits, return values, or how it differs from siblings, which is insufficient for a tool that might involve system configuration or data retrieval in a complex environment like Magento 2.

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 does not add any parameter semantics beyond this, so it meets the baseline for high schema coverage without compensating or enhancing understanding.

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 action ('List') and resource ('all base URLs for Magento 2 stores'), making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'sys-store-list' or 'sys-url-list', which might have overlapping functionality, preventing a perfect 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?

No guidance is provided on when to use this tool versus alternatives such as 'sys-store-list' or 'sys-url-list' from the sibling list. The description lacks context on prerequisites, exclusions, or specific scenarios, leaving usage unclear.

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