Skip to main content
Glama
run-as-root

Warden Magento MCP Server

by run-as-root

warden_stop_svc

Stop Warden system services for a Magento 2 project to manage development environment resources. Specify the project directory path to halt services.

Instructions

Stop Warden system services

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYesPath to the project directory

Implementation Reference

  • The handler function for warden_stop_svc tool. It extracts the project_path argument and calls executeWardenCommand with warden svc down to stop the services.
    async stopSvc(args) {
      const { project_path } = args;
      return await this.executeWardenCommand(
        project_path,
        ["svc", "down"],
        "Stopping Warden system services",
      );
    }
  • The tool schema definition including name, description, and inputSchema requiring project_path.
    {
      name: "warden_stop_svc",
      description: "Stop Warden system services",
      inputSchema: {
        type: "object",
        properties: {
          project_path: {
            type: "string",
            description: "Path to the project directory",
          },
        },
        required: ["project_path"],
      },
    },
  • server.js:329-330 (registration)
    The registration in the CallToolRequestHandler switch statement that maps the tool name to the stopSvc handler method.
    case "warden_stop_svc":
      return await this.stopSvc(request.params.arguments);
  • Helper method used by stopSvc to execute the warden command, handle paths, validate existence, run the command, and format the response.
    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 tool stops services but doesn't mention whether this requires specific permissions, if the action is reversible, what happens to dependent processes, or any rate limits. For a potentially destructive operation, this is a significant gap.

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 with zero waste. It's front-loaded with the core action and resource, 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?

Given the tool's complexity (a potentially destructive operation with no annotations and no output schema), the description is incomplete. It doesn't explain what 'stopping' entails, what services are affected, or what the expected outcome is. For a tool that might impact system state, more context is needed.

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 the single parameter 'project_path'. The description adds no additional meaning about this parameter beyond what the schema provides, such as why the project path is needed or how it relates to stopping services. Baseline 3 is appropriate when 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 ('Stop') and the resource ('Warden system services'), providing a specific verb+resource combination. However, it doesn't differentiate from its sibling 'warden_stop_project', which might handle broader project-level stopping versus service-specific stopping.

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 like 'warden_stop_project' or 'warden_start_svc'. It lacks context about prerequisites, exclusions, or typical scenarios for stopping services versus stopping the entire project.

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