Skip to main content
Glama
run-as-root

Warden Magento MCP Server

by run-as-root

warden_magento_cli

Execute Magento CLI commands within Warden-managed development environments to manage and automate Magento 2 operations directly from AI assistants.

Instructions

Run bin/magento command inside the php-fpm container

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYesPath to the project directory
commandYesMagento CLI command (without 'bin/magento' prefix)
argsNoAdditional arguments for the command

Implementation Reference

  • Main handler function that runs the Magento CLI command (bin/magento) inside the Warden php-fpm container by constructing a warden env exec command and delegating to executeWardenCommand.
    async runMagentoCli(args) {
      const { project_path, command, args: commandArgs = [] } = args;
    
      const wardenCommand = [
        "env",
        "exec",
        "-T",
        "php-fpm",
        "php",
        "bin/magento",
        command,
        ...commandArgs,
      ];
    
      return await this.executeWardenCommand(
        project_path,
        wardenCommand,
        `Running Magento CLI: bin/magento ${command}`,
      );
    }
  • Tool schema definition in the ListTools response, specifying name, description, and inputSchema with required project_path and command, optional args array.
    {
      name: "warden_magento_cli",
      description: "Run bin/magento command inside the php-fpm container",
      inputSchema: {
        type: "object",
        properties: {
          project_path: {
            type: "string",
            description: "Path to the project directory",
          },
          command: {
            type: "string",
            description:
              "Magento CLI command (without 'bin/magento' prefix)",
          },
          args: {
            type: "array",
            description: "Additional arguments for the command",
            items: {
              type: "string",
            },
            default: [],
          },
        },
        required: ["project_path", "command"],
      },
    },
  • server.js:335-336 (registration)
    Registration of the tool handler in the CallToolRequestSchema switch statement, mapping the tool name to the runMagentoCli method.
    case "warden_magento_cli":
      return await this.runMagentoCli(request.params.arguments);
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 mentions running commands inside a container but lacks details on permissions, side effects (e.g., whether it modifies files or databases), error handling, or output format. This is inadequate for a tool that likely executes commands with potential system impacts.

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 function without unnecessary words. It's front-loaded and easy to parse, 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 complexity of executing CLI commands in a container, no annotations, and no output schema, the description is insufficient. It doesn't cover behavioral aspects like safety, permissions, or what to expect in terms of results or errors, leaving significant gaps for an agent to use this tool effectively.

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 well. The description adds minimal value beyond implying the command is run in a specific context (php-fpm container), but it doesn't provide additional syntax, examples, or constraints beyond what's in the schema, 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 ('Run') and target ('bin/magento command inside the php-fpm container'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like warden_php_script or warden_composer, which might also execute commands in containers, leaving some ambiguity about when this specific tool is preferred.

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 like warden_php_script or warden_composer. The description implies it's for Magento CLI commands, but it doesn't specify prerequisites, such as needing a running project or container, or exclusions for other types of commands.

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/run-as-root/warden-mcp-server'

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