Skip to main content
Glama
HatriGt

HANA Cloud MCP Server

by HatriGt

hana_test_connection

Test connectivity to HANA Cloud databases to verify network access and authentication before performing operations.

Instructions

Test connection to HANA database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that tests the HANA connection using connectionManager.testConnection(), handles configuration checks, formats success/error responses using Formatters.
    static async testConnection(args) {
      logger.tool('hana_test_connection');
      
      if (!config.isHanaConfigured()) {
        const missingConfig = config.getDisplayConfig();
        const errorMessage = Formatters.formatConnectionTest(missingConfig, false, 'Missing required configuration');
        return Formatters.createErrorResponse('Connection test failed!', errorMessage);
      }
      
      try {
        const testResult = await connectionManager.testConnection();
        const displayConfig = config.getDisplayConfig();
        
        if (testResult.success) {
          const successMessage = Formatters.formatConnectionTest(displayConfig, true, null, testResult.result);
          return Formatters.createResponse(successMessage);
        } else {
          const errorMessage = Formatters.formatConnectionTest(displayConfig, false, testResult.error);
          return Formatters.createErrorResponse('Connection test failed!', errorMessage);
        }
      } catch (error) {
        logger.error('Connection test error:', error.message);
        const displayConfig = config.getDisplayConfig();
        const errorMessage = Formatters.formatConnectionTest(displayConfig, false, error.message);
        return Formatters.createErrorResponse('Connection test failed!', errorMessage);
      }
    }
  • Defines the tool metadata including name, description, and input schema (no parameters required).
    {
      name: "hana_test_connection",
      description: "Test connection to HANA database",
      inputSchema: {
        type: "object",
        properties: {},
        required: []
      }
    },
  • Maps the tool name 'hana_test_connection' to its implementation ConfigTools.testConnection in the TOOL_IMPLEMENTATIONS object used by ToolRegistry.
    const TOOL_IMPLEMENTATIONS = {
      hana_show_config: ConfigTools.showConfig,
      hana_test_connection: ConfigTools.testConnection,
      hana_show_env_vars: ConfigTools.showEnvVars,
      hana_list_schemas: SchemaTools.listSchemas,
      hana_list_tables: TableTools.listTables,
      hana_describe_table: TableTools.describeTable,
      hana_list_indexes: IndexTools.listIndexes,
      hana_describe_index: IndexTools.describeIndex,
      hana_execute_query: QueryTools.executeQuery
    };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Test connection') but doesn't explain what this entails—e.g., whether it performs authentication checks, network pings, returns success/failure status, or has side effects like logging. For a tool with zero annotation coverage, this is a significant gap in transparency.

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, clear sentence with no wasted words. It's front-loaded with the core purpose and efficiently communicates the essential action without unnecessary elaboration, making it highly concise and well-structured.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on behavior, output, or usage context. For a connection-testing tool, more information on what 'test' means and what results to expect would improve completeness, but it meets the basic threshold.

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 the schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. A baseline of 4 is applied for zero-parameter tools, as there's nothing to compensate for.

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 with a specific verb ('Test') and resource ('connection to HANA database'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'hana_show_config' or 'hana_show_env_vars' which might also provide connection-related information, so it doesn't reach the highest score.

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, timing (e.g., before executing queries), or how it differs from siblings like 'hana_show_config' that might show connection details. This lack of context leaves the agent with minimal usage direction.

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/HatriGt/hana-mcp-server'

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