Skip to main content
Glama
vespo92

TrueNAS Core MCP Server

debug_connection

Analyze and troubleshoot connection settings and environment variables for seamless integration between MCP clients and TrueNAS Core systems.

Instructions

Debug connection settings and environment variables

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'debug_connection' tool. It returns a dictionary with debug information about environment variables (with masked API key), client connection status, and feature flags.
    async def debug_connection(self) -> Dict[str, Any]:
        """
        Debug connection settings and environment variables
        
        Returns:
            Dictionary containing debug information
        """
        await self.ensure_initialized()
        
        # Mask sensitive data
        api_key = self.settings.truenas_api_key.get_secret_value()
        masked_key = f"{api_key[:8]}...{api_key[-4:]}" if len(api_key) > 12 else "***"
        
        return {
            "success": True,
            "environment": {
                "TRUENAS_URL": str(self.settings.truenas_url),
                "TRUENAS_API_KEY": masked_key,
                "TRUENAS_VERIFY_SSL": self.settings.truenas_verify_ssl,
                "TRUENAS_ENV": self.settings.environment,
                "TRUENAS_LOG_LEVEL": self.settings.log_level
            },
            "client": {
                "connected": self.client._client is not None if self.client else False,
                "base_url": self.settings.api_base_url,
                "timeout": self.settings.http_timeout,
                "max_retries": self.settings.http_max_retries
            },
            "features": {
                "debug_tools": self.settings.enable_debug_tools,
                "destructive_operations": self.settings.enable_destructive_operations,
                "rate_limiting": self.settings.rate_limit_enabled
            }
        }
  • Registers the 'debug_connection' tool (along with test_connection and get_server_stats) in the DebugTools class's tool definitions list, specifying the handler, description, and empty input schema.
    def get_tool_definitions(self) -> list:
        """Get tool definitions for debug tools"""
        return [
            ("debug_connection", self.debug_connection, "Debug connection settings and environment variables", {}),
            ("test_connection", self.test_connection, "Test the connection to TrueNAS API", {}),
            ("get_server_stats", self.get_server_stats, "Get MCP server statistics", {}),
        ]
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'debugs' but doesn't clarify what this entails—e.g., whether it's a read-only diagnostic, modifies settings, requires specific permissions, or has side effects like logging or alerts. This is a significant gap for a tool with potential system interactions.

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?

The description is a single, efficient sentence: 'Debug connection settings and environment variables.' It is front-loaded with the core action and target, with zero wasted words, making it highly concise and well-structured for quick understanding.

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 the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'debugging' involves—e.g., whether it returns diagnostic data, logs errors, or requires specific system states. For a tool that might interact with system connections, more context on behavior and outputs is needed to guide the agent effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately avoids unnecessary details. A baseline of 4 is applied since no parameters exist, and the description doesn't mislead about inputs.

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: 'Debug connection settings and environment variables.' It specifies the action ('debug') and the target resources ('connection settings and environment variables'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'reset_connection', which might be a related operation.

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, context, or exclusions, such as when to choose 'debug_connection' over 'reset_connection' or other diagnostic tools. This leaves the agent without clear usage instructions.

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

Related 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/vespo92/TrueNasCoreMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server