Skip to main content
Glama
elgentos

Magento 2 Development MCP Server

by elgentos

Config Store Set

config-store-set

Set store-specific configuration values in Magento 2 to customize settings for individual store views or websites.

Instructions

Set store-specific Magento 2 configuration values

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesConfiguration path to set
storeIdNoStore ID (optional)
valueYesValue to set

Implementation Reference

  • The handler function for the 'config-store-set' tool. It builds a magerun2 command to set store-specific configuration and executes it, returning success or error response.
    async ({ path, value, storeId }) => {
      let command = `magerun2 config:store:set "${path}" "${value}"`;
    
      if (storeId) {
        command += ` --store-id="${storeId}"`;
      }
    
      const result = await executeMagerun2Command(command);
    
      if (!result.success) {
        return {
          content: [{
            type: "text",
            text: result.error
          }],
          isError: true
        };
      }
    
      return {
        content: [{
          type: "text",
          text: `Store configuration set successfully:\n\n${result.data}`
        }]
      };
    }
  • Input schema using Zod for validating the tool's parameters: path (string), value (string), storeId (optional string).
    inputSchema: {
      path: z.string()
        .describe("Configuration path to set"),
      value: z.string()
        .describe("Value to set"),
      storeId: z.string()
        .optional()
        .describe("Store ID (optional)")
    }
  • src/index.ts:889-930 (registration)
    Registration of the 'config-store-set' tool with server.registerTool, including name, metadata (title, description), input schema, and inline handler function.
    server.registerTool(
      "config-store-set",
      {
        title: "Config Store Set",
        description: "Set store-specific Magento 2 configuration values",
        inputSchema: {
          path: z.string()
            .describe("Configuration path to set"),
          value: z.string()
            .describe("Value to set"),
          storeId: z.string()
            .optional()
            .describe("Store ID (optional)")
        }
      },
      async ({ path, value, storeId }) => {
        let command = `magerun2 config:store:set "${path}" "${value}"`;
    
        if (storeId) {
          command += ` --store-id="${storeId}"`;
        }
    
        const result = await executeMagerun2Command(command);
    
        if (!result.success) {
          return {
            content: [{
              type: "text",
              text: result.error
            }],
            isError: true
          };
        }
    
        return {
          content: [{
            type: "text",
            text: `Store configuration set successfully:\n\n${result.data}`
          }]
        };
      }
    );
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 'Set' which implies a write/mutation operation, but doesn't cover critical aspects like required permissions, whether changes are reversible, potential side effects, or error handling. This is inadequate for a mutation tool with zero annotation coverage.

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 fluff or redundancy. It's 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.

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral traits (e.g., permissions, side effects), output format, and differentiation from siblings, leaving significant gaps for an agent to use it correctly.

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%, so the schema already documents all parameters (path, storeId, value) with clear descriptions. The description adds no additional meaning beyond what's in the schema, such as examples or format details, meeting the baseline for high coverage.

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 ('Set') and resource ('store-specific Magento 2 configuration values'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'config-set' (which likely sets global config) or 'config-store-get' (which retrieves store config), missing full sibling distinction.

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. With siblings like 'config-set' (presumably for global config) and 'config-store-get' (for retrieval), there's no indication of context, prerequisites, or exclusions, leaving usage ambiguous.

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