Skip to main content
Glama
elgentos

Magento 2 Development MCP Server

by elgentos

config-store-get

Retrieve store-specific configuration values from Magento 2 by providing the configuration path and optional store ID to access targeted settings.

Instructions

Get store-specific Magento 2 configuration values

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesConfiguration path to get
storeIdNoStore ID (optional)

Implementation Reference

  • src/index.ts:843-882 (registration)
    Registration of the 'config-store-get' tool using server.registerTool, including name, metadata (title, description, inputSchema), and inline handler function.
    server.registerTool( "config-store-get", { title: "Config Store Get", description: "Get store-specific Magento 2 configuration values", inputSchema: { path: z.string() .describe("Configuration path to get"), storeId: z.string() .optional() .describe("Store ID (optional)") } }, async ({ path, storeId }) => { let command = `magerun2 config:store:get "${path}"`; 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 value:\n\n${result.data}` }] }; } );
  • The handler function for 'config-store-get' that constructs and executes a magerun2 config:store:get command, handles errors, and returns formatted results.
    async ({ path, storeId }) => { let command = `magerun2 config:store:get "${path}"`; 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 value:\n\n${result.data}` }] }; }
  • Zod-based input schema defining required 'path' (string) and optional 'storeId' (string) parameters for the tool.
    inputSchema: { path: z.string() .describe("Configuration path to get"), storeId: z.string() .optional() .describe("Store ID (optional)") }

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