Skip to main content
Glama

manage_config

Configure QIT MCP Server settings for backends, partners, and tunneling to manage test environments and connections.

Instructions

Manage QIT configuration (backends, partners, tunneling). Actions: add_backend, remove_backend, switch_backend, current_backend, add_partner, remove_partner, setup_tunnel, set_default_tunnel

⚠️ 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
actionYesThe configuration action to perform
nameNoBackend or partner name (required for add/remove/switch)
urlNoBackend URL (for add_backend)
tunnel_methodNoTunnel method (for tunnel actions: ngrok, cloudflare, etc.)

Implementation Reference

  • The main handler function for the 'manage_config' tool. It parses the action and arguments, constructs the corresponding QIT CLI command, and executes it using buildArgs and executeAndFormat.
    handler: async (args: {
      action: (typeof configActions)[number];
      name?: string;
      url?: string;
      tunnel_method?: string;
    }) => {
      let command: string;
      let positional: string[] = [];
      const flags: Record<string, string | boolean | undefined> = {};
    
      switch (args.action) {
        case "add_backend":
          command = "backend:add";
          if (args.name) positional.push(args.name);
          if (args.url) flags.url = args.url;
          break;
    
        case "remove_backend":
          command = "backend:remove";
          if (args.name) positional.push(args.name);
          break;
    
        case "switch_backend":
          command = "backend:switch";
          if (args.name) positional.push(args.name);
          break;
    
        case "current_backend":
          command = "backend:current";
          break;
    
        case "add_partner":
          command = "partner:add";
          if (args.name) positional.push(args.name);
          break;
    
        case "remove_partner":
          command = "partner:remove";
          if (args.name) positional.push(args.name);
          break;
    
        case "setup_tunnel":
          command = "tunnel:setup";
          if (args.tunnel_method) positional.push(args.tunnel_method);
          break;
    
        case "set_default_tunnel":
          command = "tunnel:set-default";
          if (args.tunnel_method) positional.push(args.tunnel_method);
          break;
    
        default:
          return {
            content: `Unknown action: ${args.action}`,
            isError: true,
          };
      }
    
      const cmdArgs = buildArgs(command, positional, flags);
      return executeAndFormat(cmdArgs);
    },
  • Definition of the 'manage_config' tool including name, description, and input schema using Zod for validation.
    manage_config: {
      name: "manage_config",
      description: `Manage QIT configuration (backends, partners, tunneling). Actions: ${configActions.join(", ")}`,
      inputSchema: z.object({
        action: z
          .enum(configActions)
          .describe("The configuration action to perform"),
        name: z
          .string()
          .optional()
          .describe("Backend or partner name (required for add/remove/switch)"),
        url: z
          .string()
          .optional()
          .describe("Backend URL (for add_backend)"),
        tunnel_method: z
          .string()
          .optional()
          .describe("Tunnel method (for tunnel actions: ngrok, cloudflare, etc.)"),
      }),
  • src/server.ts:25-38 (registration)
    Registers 'manage_config' (via allTools) for listing available tools in the MCP server.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      // Check if QIT CLI is available
      const cliInfo = detectQitCli();
    
      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 };
    });
  • src/server.ts:44-65 (registration)
    Handles tool calls by looking up the handler from allTools (which includes manage_config) and executing it.
    const tool = allTools[name as ToolName];
    
    if (!tool) {
      return {
        content: [
          {
            type: "text",
            text: `Unknown tool: ${name}`,
          },
        ],
        isError: true,
      };
    }
    
    try {
      // Validate input
      const validatedArgs = tool.inputSchema.parse(args);
    
      // Execute tool
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      const result = await (tool.handler as (args: any) => Promise<{ content: string; isError: boolean }>)(validatedArgs);
  • Aggregates and exports all tools, spreading configTools (containing manage_config) into allTools used by the server.
    export const allTools = {
      ...authTools,
      ...testExecutionTools,
      ...testResultsTools,
      ...groupsTools,
      ...environmentTools,
      ...packagesTools,
      ...configTools,
      ...utilitiesTools,
    };
Behavior2/5

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

With no annotations, the description carries full burden but lacks behavioral details. It lists actions but doesn't disclose effects (e.g., whether changes are persistent, require authentication, or have side effects). The CLI warning is helpful for setup but doesn't describe tool behavior during execution.

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: it mixes tool purpose with installation instructions and a warning. The first sentence is useful, but the CLI warning (6 lines) is extraneous for tool selection. It's not front-loaded and includes unnecessary content.

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 configuration management tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on return values, error conditions, or operational context (e.g., how it interacts with other tools like 'authenticate'). The CLI warning doesn't compensate for these gaps.

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 baseline is 3. The description lists action names but doesn't add meaning beyond the schema's enum values. It doesn't explain parameter dependencies (e.g., 'name' is required for specific actions) or provide examples, so it adds minimal value.

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 manages QIT configuration for backends, partners, and tunneling, with specific actions listed. It distinguishes itself from siblings like 'manage_cache' or 'manage_package' by focusing on configuration management. However, it doesn't explicitly contrast with all siblings, so it's not a perfect 5.

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 lists actions but doesn't explain prerequisites (e.g., QIT CLI installation), appropriate contexts, or when to choose other tools like 'authenticate' or 'exec_in_environment'. The CLI warning is diagnostic, not usage guidance.

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