Skip to main content
Glama

n8n_health_check

Verify n8n instance connectivity and validate API credentials to ensure proper integration with Cursor IDE's workflow management capabilities.

Instructions

Check the connection to the n8n instance and verify API credentials.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the 'n8n_health_check' tool. It initializes the N8nApiClient, performs a health check, and returns a formatted response indicating connection status.
    private async handleHealthCheck(): Promise<ToolResult> {
      try {
        const client = this.initializeApiClient();
        const result = await client.healthCheck();
        
        return {
          content: [
            {
              type: 'text' as const,
              text: JSON.stringify({
                status: result.status,
                apiUrl: process.env.N8N_API_URL,
                message: result.status === 'connected' 
                  ? 'Successfully connected to n8n instance' 
                  : `Connection failed: ${result.version}`,
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : 'Unknown error';
        return {
          content: [
            {
              type: 'text' as const,
              text: JSON.stringify({
                status: 'error',
                apiUrl: process.env.N8N_API_URL || 'Not configured',
                message: errorMessage,
              }, null, 2),
            },
          ],
          isError: true,
        };
      }
    }
  • Dispatch logic in handleToolCall method that routes 'n8n_health_check' calls to the dedicated handleHealthCheck function.
    if (name === 'n8n_health_check') {
      return this.handleHealthCheck();
    }
  • Tool schema/definition including name, description, and empty input schema (no parameters required).
      name: 'n8n_health_check',
      description: 'Check the connection to the n8n instance and verify API credentials.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Registration of the tool via aggregation into allTools array, which includes executionTools containing 'n8n_health_check'.
    export const allTools: ToolDefinition[] = [
      ...documentationTools,  // Documentation first for discoverability
      ...workflowTools,
      ...executionTools,
    ];
  • Supporting healthCheck method in N8nApiClient that verifies API connectivity by attempting to list workflows.
    /**
     * Check n8n API connectivity
     */
    async healthCheck(): Promise<{ status: string; version?: string }> {
      try {
        // Try to list workflows with limit 1 to verify connection
        await this.request<N8nListResponse<N8nWorkflow>>('/workflows?limit=1');
        return { status: 'connected' };
      } catch (error) {
        return { 
          status: 'error', 
          version: error instanceof Error ? error.message : 'Unknown error' 
        };
      }
    }
Behavior3/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 mentions checking connection and verifying credentials, which implies a read-only diagnostic operation without side effects. However, it doesn't specify error conditions, response format, or any rate limits or authentication requirements beyond the verification aspect.

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 that directly states the tool's function without unnecessary words. It's front-loaded with the core purpose and avoids redundancy, making it easy to understand quickly.

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 adequate but minimal. It covers the basic purpose but lacks details on what the check entails, expected outputs, or error handling. For a health check tool, more context on what 'verification' means would enhance completeness.

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 with 100% schema description coverage, so the schema fully documents the absence of inputs. The description doesn't need to add parameter details, but it effectively explains what the tool does without parameters, maintaining clarity. Baseline is 4 for 0 parameters as per guidelines.

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 tool's purpose with specific verbs ('check connection', 'verify API credentials') and identifies the target resource ('n8n instance'). It distinguishes itself from sibling tools like workflow management or execution tools by focusing on system health and authentication verification.

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

Usage Guidelines4/5

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

The description implies usage context (verifying API credentials and connection status), which suggests using this tool for initial setup or troubleshooting connectivity. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools, though the purpose naturally differentiates it from workflow-related operations.

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/alicankiraz1/cursor-n8n-builder'

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