Skip to main content
Glama

get_auth_status

Check QIT CLI authentication status to verify access for testing WordPress/WooCommerce plugins.

Instructions

Check if QIT CLI is authenticated and show current authentication status.

⚠️ 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

No arguments

Implementation Reference

  • The handler function that implements the logic for the 'get_auth_status' tool. It attempts to list extensions using the QIT CLI to verify authentication status, counts available extensions if successful, checks for specific error messages indicating authentication issues, and returns a formatted response.
    handler: async () => {
      // Try to list extensions - if it works, we're authenticated
      const result = await executeQitCommand(["extensions", "--no-interaction"]);
    
      if (result.success) {
        // Count lines that look like extension rows (start with |)
        const lines = result.stdout.split("\n");
        const extensionLines = lines.filter(line =>
          line.startsWith("|") && !line.includes("ID") && !line.includes("---")
        );
        const count = extensionLines.length;
        return {
          content: `Authenticated. You have access to ${count} extension(s). Use 'list_extensions' tool to see the full list.`,
          isError: false,
        };
      }
    
      // Check if error indicates auth issue
      const output = result.stderr || result.stdout;
      if (
        output.includes("not connected") ||
        output.includes("authenticate") ||
        output.includes("connect")
      ) {
        return {
          content:
            "Not authenticated. Use the 'authenticate' tool to connect with your WooCommerce.com Partner Developer account.",
          isError: false,
        };
      }
    
      return {
        content: `Unable to determine authentication status: ${output}`,
        isError: true,
      };
    },
  • The tool definition including name, description, and empty input schema (no parameters required).
    get_auth_status: {
      name: "get_auth_status",
      description:
        "Check if QIT CLI is authenticated and show current authentication status.",
      inputSchema: z.object({}),
  • Imports the authTools object (containing get_auth_status) and spreads it into the central allTools export, aggregating all tools in the codebase.
    import { authTools } from "./auth.js";
    import { testExecutionTools } from "./test-execution.js";
    import { testResultsTools } from "./test-results.js";
    import { groupsTools } from "./groups.js";
    import { environmentTools } from "./environment.js";
    import { packagesTools } from "./packages.js";
    import { configTools } from "./config.js";
    import { utilitiesTools } from "./utilities.js";
    
    export const allTools = {
      ...authTools,
  • src/server.ts:8-44 (registration)
    Imports allTools and uses it to dispatch tool calls in the MCP server request handler, retrieving the specific tool by name and executing its handler.
    import { allTools, ToolName } from "./tools/index.js";
    import { detectQitCli, getQitCliNotFoundError } from "./cli/detector.js";
    
    export function createServer() {
      const server = new Server(
        {
          name: "qit-mcp",
          version: "0.1.0",
        },
        {
          capabilities: {
            tools: {},
          },
        }
      );
    
      // List available tools
      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 };
      });
    
      // Handle tool calls
      server.setRequestHandler(CallToolRequestSchema, async (request) => {
        const { name, arguments: args } = request.params;
    
        const tool = allTools[name as ToolName];

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