Skip to main content
Glama

stop_environment

Stop a running QIT test environment to free resources. Specify an environment ID to stop a single instance, or omit to stop all active environments.

Instructions

Stop a running QIT test environment.

⚠️ QIT CLI not detected. QIT CLI not found. Please install it using one of these methods:

  1. Via Composer (recommended): composer require woocommerce/qit-cli --dev

  2. Set QIT_CLI_PATH environment variable: export QIT_CLI_PATH=/path/to/qit

  3. Ensure 'qit' is available in your system PATH

For more information, visit: https://github.com/woocommerce/qit-cli

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
env_idNoEnvironment ID to stop. If not provided, stops all environments.

Implementation Reference

  • The main handler function for the 'stop_environment' tool. It constructs the command arguments for the QIT CLI 'env:down' command, optionally using a specific environment ID, and executes it via executeAndFormat.
    handler: async (args: { env_id?: string }) => {
      const positional = args.env_id ? [args.env_id] : [];
      const cmdArgs = buildArgs("env:down", positional, {});
      return executeAndFormat(cmdArgs);
    },
  • Zod input schema validating the optional 'env_id' parameter for the tool.
    inputSchema: z.object({
      env_id: z
        .string()
        .optional()
        .describe(
          "Environment ID to stop. If not provided, stops all environments."
        ),
    }),
  • Complete tool object definition within the 'environmentTools' export, registering the tool's name, description, schema, and handler.
    stop_environment: {
      name: "stop_environment",
      description: "Stop a running QIT test environment.",
      inputSchema: z.object({
        env_id: z
          .string()
          .optional()
          .describe(
            "Environment ID to stop. If not provided, stops all environments."
          ),
      }),
      handler: async (args: { env_id?: string }) => {
        const positional = args.env_id ? [args.env_id] : [];
        const cmdArgs = buildArgs("env:down", positional, {});
        return executeAndFormat(cmdArgs);
      },
    },
  • Aggregates 'environmentTools' (including 'stop_environment') into the central 'allTools' export used by the MCP server.
    export const allTools = {
      ...authTools,
      ...testExecutionTools,
      ...testResultsTools,
      ...groupsTools,
      ...environmentTools,
      ...packagesTools,
      ...configTools,
      ...utilitiesTools,
    };
  • src/server.ts:29-38 (registration)
    Registers all tools from 'allTools' (including 'stop_environment') with the MCP server for the ListTools request.
      const tools = Object.entries(allTools).map(([_, tool]) => ({
        name: tool.name,
        description: cliInfo
          ? tool.description
          : `${tool.description}\n\n⚠️ QIT CLI not detected. ${getQitCliNotFoundError()}`,
        inputSchema: zodToJsonSchema(tool.inputSchema),
      }));
    
      return { tools };
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions that the tool requires QIT CLI installation, which is useful context about prerequisites. However, it doesn't describe what 'stop' actually does behaviorally - whether it gracefully shuts down services, preserves data, or destroys the environment. For a mutation tool with zero annotation coverage, this is a significant gap in behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is poorly structured and not front-loaded with essential information. The first sentence is good, but then it devotes 90% of the content to installation instructions and error messages that don't belong in a tool description. This is wasted space that should instead explain tool behavior, usage context, or parameter details. The description fails the 'every sentence should earn its place' test.

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 focuses on installation problems rather than explaining what the tool does, when to use it, what happens when you stop an environment, or what the expected outcome is. Given the complexity of environment management and the lack of structured documentation, the description should provide much more contextual information about the operation's effects and appropriate usage.

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% (the env_id parameter is fully documented in the schema), so the baseline is 3 even though the description adds no parameter information. The description doesn't mention the parameter at all, nor does it provide additional context about environment IDs or the default behavior when no ID is provided. The schema carries the full parameter documentation burden.

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 verb ('stop') and resource ('a running QIT test environment'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'reset_environment', which could be a similar operation. The first sentence effectively communicates the core function.

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 'reset_environment' or 'list_environments'. While it mentions prerequisites (QIT CLI installation), it doesn't explain the appropriate context for stopping an environment versus other environment management operations. The focus is on setup requirements rather than usage scenarios.

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/woocommerce/qit-mcp'

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