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); }, },

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