Skip to main content
Glama

reset_environment

Reset a QIT test environment's database to its initial post-setup state for clean testing conditions.

Instructions

Reset a QIT test environment's database to the post-setup state.

⚠️ 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 reset. If not provided, resets the most recent environment.

Implementation Reference

  • The handler function implementing the reset_environment tool. It builds CLI arguments for the 'qit env:reset' command, optionally using the provided env_id or defaulting to the most recent environment, and executes it using helper functions.
    handler: async (args: { env_id?: string }) => {
      const positional = args.env_id ? [args.env_id] : [];
      const cmdArgs = buildArgs("env:reset", positional, {});
      return executeAndFormat(cmdArgs);
    },
  • The Zod input schema defining the parameters for the reset_environment tool: an optional env_id string.
    inputSchema: z.object({
      env_id: z
        .string()
        .optional()
        .describe(
          "Environment ID to reset. If not provided, resets the most recent environment."
        ),
    }),
  • The complete tool definition object for 'reset_environment' within the environmentTools export, which is aggregated into allTools and registered in the MCP server.
    reset_environment: {
      name: "reset_environment",
      description:
        "Reset a QIT test environment's database to the post-setup state.",
      inputSchema: z.object({
        env_id: z
          .string()
          .optional()
          .describe(
            "Environment ID to reset. If not provided, resets the most recent environment."
          ),
      }),
      handler: async (args: { env_id?: string }) => {
        const positional = args.env_id ? [args.env_id] : [];
        const cmdArgs = buildArgs("env:reset", positional, {});
        return executeAndFormat(cmdArgs);
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool resets a database to a specific state, implying a destructive mutation, but doesn't disclose critical behavioral traits: whether this requires specific permissions, if changes are irreversible, what happens to ongoing processes, error handling, or typical response format. The installation warning adds operational context but not behavioral transparency about the tool's execution.

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

Conciseness1/5

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

The description is poorly structured and not front-loaded. The first sentence states the purpose, but the remaining ~80% is installation troubleshooting unrelated to tool functionality. This wastes space and buries the operational intent. Every sentence after the first fails to earn its place in a tool description meant for AI agents.

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 no annotations, no output schema, and a mutation tool with potential side effects, the description is incomplete. It lacks information on prerequisites, behavioral outcomes, error conditions, and relationship to sibling tools. The installation warning addresses a setup issue but doesn't compensate for missing operational context. For a destructive reset tool, this is inadequate.

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% with one parameter ('env_id') fully documented in the schema. The description adds no parameter-specific information beyond what the schema provides (e.g., no examples of environment IDs, no clarification on 'most recent environment' logic). With high schema coverage, the baseline is 3, and the description doesn't compensate with additional semantic context.

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 tool's purpose: 'Reset a QIT test environment's database to the post-setup state.' This specifies the verb ('reset'), resource ('QIT test environment's database'), and target state ('post-setup state'). It distinguishes from siblings like 'start_environment' or 'stop_environment' by focusing on database reset rather than environment lifecycle management. However, it doesn't explicitly differentiate from potential data-clearing operations in other tools.

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., environment must be running), exclusions (e.g., don't use during active tests), or compare to siblings like 'manage_cache' or 'sync_cache' that might affect environment state. The bulk of the text is installation instructions, not usage context.

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