Skip to main content
Glama
run-as-root

Warden Magento MCP Server

by run-as-root

warden_start_project

Initialize a Warden-managed Magento 2 development environment by specifying the project directory path to automate project setup and configuration.

Instructions

Start a Warden project environment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYesPath to the project directory

Implementation Reference

  • The handler function for the 'warden_start_project' tool. It destructures the project_path from arguments and invokes executeWardenCommand to run 'warden env up' in the specified project directory.
    async startProject(args) {
      const { project_path } = args;
      return await this.executeWardenCommand(
        project_path,
        ["env", "up"],
        "Starting Warden project environment",
      );
    }
  • server.js:44-56 (registration)
    Registers the 'warden_start_project' tool in the ListTools response, including name, description, and input schema.
    {
      name: "warden_start_project",
      description: "Start a Warden project environment",
      inputSchema: {
        type: "object",
        properties: {
          project_path: {
            type: "string",
            description: "Path to the project directory",
          },
        },
        required: ["project_path"],
      },
  • Defines the input schema for the 'warden_start_project' tool, requiring a 'project_path' string.
    inputSchema: {
      type: "object",
      properties: {
        project_path: {
          type: "string",
          description: "Path to the project directory",
        },
      },
      required: ["project_path"],
    },
  • server.js:323-324 (registration)
    Registers the handler dispatch for 'warden_start_project' in the CallToolRequestHandler switch statement.
    case "warden_start_project":
      return await this.startProject(request.params.arguments);
  • Helper function used by the handler to execute the 'warden' CLI command in the project directory, with full validation, execution via spawn, and structured result return.
    async executeWardenCommand(project_path, wardenArgs, description) {
      if (!project_path) {
        throw new Error("project_path is required");
      }
    
      const normalizedProjectPath = project_path.replace(/\/+$/, "");
      const absoluteProjectPath = resolve(normalizedProjectPath);
    
      if (!existsSync(absoluteProjectPath)) {
        throw new Error(
          `Project directory does not exist: ${absoluteProjectPath}`,
        );
      }
    
      try {
        const result = await this.executeCommand(
          "warden",
          wardenArgs,
          absoluteProjectPath,
        );
    
        const commandStr = `warden ${wardenArgs.join(" ")}`;
        const isSuccess = result.code === 0;
    
        return {
          content: [
            {
              type: "text",
              text: `${description} ${isSuccess ? "completed successfully" : "failed"}!\n\nCommand: ${commandStr}\nWorking directory: ${absoluteProjectPath}\nExit Code: ${result.code}\n\nOutput:\n${result.stdout || "(no output)"}\n\nErrors:\n${result.stderr || "(no errors)"}`,
            },
          ],
          isError: !isSuccess,
        };
      } catch (error) {
        const commandStr = `warden ${wardenArgs.join(" ")}`;
        return {
          content: [
            {
              type: "text",
              text: `Failed to execute command:\n\nCommand: ${commandStr}\nWorking directory: ${absoluteProjectPath}\nError: ${error.message}\n\nOutput:\n${error.stdout || "(no output)"}\n\nErrors:\n${error.stderr || "(no errors)"}`,
            },
          ],
          isError: true,
        };
      }
    }
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 the action ('Start') but lacks details on what 'starting' entails (e.g., does it launch services, set up configurations, require specific permissions?), potential side effects, or error conditions. This leaves significant gaps in understanding the tool's behavior.

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, direct sentence with zero wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration, earning a top score for brevity and clarity.

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 implied by 'starting a project environment' (likely involving multiple steps or services), no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns, what happens during execution, or how it interacts with siblings, leaving the agent with insufficient context for effective use.

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, with the single parameter 'project_path' clearly documented in the schema. The description adds no additional semantic context about the parameter (e.g., format examples, what constitutes a valid path), so it meets the baseline of 3 where the schema does the heavy lifting.

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 ('Start') and resource ('a Warden project environment'), making the purpose understandable. However, it doesn't differentiate this tool from sibling tools like 'warden_start_svc' or 'warden_stop_project', which would require more specific context about what distinguishes starting a project environment from other start/stop operations.

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. It doesn't mention prerequisites (e.g., needing an initialized project), exclusions, or comparisons to siblings like 'warden_init_project' or 'warden_stop_project', leaving the agent without context for tool selection.

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