Skip to main content
Glama

debug_mcp_config

Analyze and troubleshoot the current MCP configuration on the mcp-with-ssh server. Optionally include detailed insights by enabling verbose mode.

Instructions

Debug the current MCP configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
verboseNoWhether to include detailed information

Implementation Reference

  • The handler function that executes the debug_mcp_config tool, gathering and returning detailed MCP configuration information including memory bank status, mode info, and system details.
    export async function handleDebugMcpConfig(
      memoryBankManager: MemoryBankManager,
      verbose: boolean = false
    ) {
      try {
        // Get basic information
        const memoryBankDir = memoryBankManager.getMemoryBankDir();
        const projectPath = memoryBankManager.getProjectPath();
        const language = memoryBankManager.getLanguage();
        const folderName = memoryBankManager.getFolderName();
        
        // Get mode information
        const modeManager = memoryBankManager.getModeManager();
        let modeInfo = null;
        if (modeManager) {
          const currentModeState = modeManager.getCurrentModeState();
          modeInfo = {
            name: currentModeState.name,
            isUmbActive: currentModeState.isUmbActive,
            memoryBankStatus: currentModeState.memoryBankStatus
          };
        }
        
        // Get Memory Bank status
        let memoryBankStatus = null;
        try {
          if (memoryBankDir) {
            memoryBankStatus = await memoryBankManager.getStatus();
          }
        } catch (error) {
          console.error('Error getting Memory Bank status:', error);
        }
        
        // Get system information
        const systemInfo = {
          platform: os.platform(),
          release: os.release(),
          arch: os.arch(),
          nodeVersion: process.version,
          cwd: process.cwd(),
          env: verbose ? process.env : undefined
        };
        
        // Collect all information
        const debugInfo = {
          timestamp: new Date().toISOString(),
          memoryBank: {
            directory: memoryBankDir,
            projectPath,
            language,
            folderName,
            status: memoryBankStatus
          },
          mode: modeInfo,
          system: systemInfo
        };
        
        return {
          content: [
            {
              type: "text",
              text: `MCP Configuration Debug Information:\n${JSON.stringify(debugInfo, null, 2)}`,
            },
          ],
        };
      } catch (error) {
        console.error("Error in handleDebugMcpConfig:", error);
        return {
          content: [
            {
              type: "text",
              text: `Error debugging MCP configuration: ${error}`,
            },
          ],
          isError: true
        };
      }
    }
  • The input schema and tool definition for debug_mcp_config, part of the coreTools array used for tool registration and validation.
    {
      name: 'debug_mcp_config',
      description: 'Debug the current MCP configuration',
      inputSchema: {
        type: 'object',
        properties: {
          verbose: {
            type: 'boolean',
            description: 'Whether to include detailed information',
            default: false,
          },
        },
        required: [],
      },
    },
  • The switch case in the tool call handler that registers and routes 'debug_mcp_config' requests to the handleDebugMcpConfig function.
    case 'debug_mcp_config': {
      const { verbose } = request.params.arguments as { verbose?: boolean };
      return handleDebugMcpConfig(memoryBankManager, verbose || false);
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations provided, so the description must disclose behavior. It only says 'Debug' without explaining what that entails—no side effects, whether it runs checks, or what output is produced. The parameter 'verbose' hints at detail but does not clarify core behavior.

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

Conciseness5/5

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

One concise sentence with no unnecessary words or repetition. Front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema and no description of what the tool returns or its behavior. For a debug tool, agents need to know output format and potential actions—completely missing.

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% for the single boolean parameter, so the description need not add param info. It does not add meaning beyond the schema, yielding a baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Debug the current MCP configuration,' which is a specific verb and resource. No sibling tool has a similar purpose, so it is well-distinguished.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives or prerequisites. While it is a standalone debug tool, context about typical scenarios (e.g., configuration issues) is missing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools

Related Tools