Skip to main content
Glama

get_health

Check server health status, authentication state, and active sessions to verify readiness for research workflows before starting.

Instructions

Get server health status including authentication state, active sessions, and configuration. Use this to verify the server is ready before starting research workflows.

If authenticated=false and having persistent issues: Consider running cleanup_data(preserve_library=true) + setup_auth for fresh start with clean browser session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Executes the get_health tool: checks authentication via AuthManager, retrieves session stats from SessionManager, gathers config values, and returns health status object.
    async handleGetHealth(): Promise<
      ToolResult<{
        status: string;
        authenticated: boolean;
        notebook_url: string;
        active_sessions: number;
        max_sessions: number;
        session_timeout: number;
        total_messages: number;
        headless: boolean;
        auto_login_enabled: boolean;
        stealth_enabled: boolean;
        troubleshooting_tip?: string;
      }> 
    > {
      log.info(`🔧 [TOOL] get_health called`);
    
      try {
        // Check authentication status
        const statePath = await this.authManager.getValidStatePath();
        const authenticated = statePath !== null;
    
        // Get session stats
        const stats = this.sessionManager.getStats();
    
        const result = {
          status: "ok",
          authenticated,
          notebook_url: CONFIG.notebookUrl || "not configured",
          active_sessions: stats.active_sessions,
          max_sessions: stats.max_sessions,
          session_timeout: stats.session_timeout,
          total_messages: stats.total_messages,
          headless: CONFIG.headless,
          auto_login_enabled: CONFIG.autoLoginEnabled,
          stealth_enabled: CONFIG.stealthEnabled,
          // Add troubleshooting tip if not authenticated
          ...((!authenticated) && {
            troubleshooting_tip:
              "For fresh start with clean browser session: Close all Chrome instances → " +
              "cleanup_data(confirm=true, preserve_library=true) → setup_auth"
          }),
        };
    
        log.success(`✅ [TOOL] get_health completed`);
        return {
          success: true,
          data: result,
        };
      } catch (error) {
        const errorMessage =
          error instanceof Error ? error.message : String(error);
        log.error(`❌ [TOOL] get_health failed: ${errorMessage}`);
        return {
          success: false,
          error: errorMessage,
        };
      }
    }
  • Defines the MCP tool schema for get_health: name, detailed description, and empty input schema (no parameters required).
      name: "get_health",
      description:
        "Get server health status including authentication state, active sessions, and configuration. " +
        "Use this to verify the server is ready before starting research workflows.\n\n" +
        "If authenticated=false and having persistent issues:\n" +
        "Consider running cleanup_data(preserve_library=true) + setup_auth for fresh start with clean browser session.",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • src/index.ts:248-250 (registration)
    Registers the dispatching of get_health tool calls in the main MCP server request handler switch statement, routing to ToolHandlers.handleGetHealth().
    case "get_health":
      result = await this.toolHandlers.handleGetHealth();
      break;
  • Includes systemTools (which defines get_health) in the aggregated list of all tool definitions returned by buildToolDefinitions.
      return [
        dynamicAskQuestionTool,
        ...notebookManagementTools,
        ...sessionManagementTools,
        ...systemTools,
      ];
    }
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by describing what information is returned (health status components) and providing troubleshooting context. It doesn't fully disclose potential rate limits or detailed response format, but gives practical operational guidance.

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?

Perfectly structured with two paragraphs: first states purpose and primary use case, second provides troubleshooting guidance. Every sentence adds value with zero redundant information. The description is appropriately sized for its complexity.

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

Completeness4/5

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

For a zero-parameter diagnostic tool with no annotations or output schema, the description provides excellent context about what information is returned and when to use it. It could slightly improve by hinting at the return format, but covers the essential operational needs well.

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?

With 0 parameters and 100% schema coverage, the baseline is 4. The description appropriately doesn't discuss parameters since none exist, and instead focuses on the tool's purpose and usage context.

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 the specific verb ('Get') and resource ('server health status') with explicit components included ('authentication state, active sessions, and configuration'). It distinguishes from siblings by focusing on system readiness rather than notebook operations or authentication management.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance ('verify the server is ready before starting research workflows') and when-not-to-use alternatives (if authenticated=false with persistent issues, use cleanup_data + setup_auth instead). It directly names alternative tools for specific scenarios.

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/inventra/notebooklm-mcp'

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