Skip to main content
Glama
bvisible

MCP SSH Manager

ssh_alert_setup

Configure monitoring alerts for SSH servers by setting CPU, memory, and disk usage thresholds to detect performance issues.

Instructions

Configure health monitoring alerts and thresholds

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverYesServer name
actionYesAction: set thresholds, get config, or check current metrics against thresholds
cpuThresholdNoCPU usage threshold percentage (e.g., 80)
memoryThresholdNoMemory usage threshold percentage (e.g., 90)
diskThresholdNoDisk usage threshold percentage (e.g., 85)
enabledNoEnable or disable alerts (default: true)

Implementation Reference

  • The 'ssh_alert_setup' tool is listed in the monitoring tool group in the centralized TOOL_GROUPS registry, used for conditional registration and validation of MCP tools based on user configuration.
    monitoring: [
      'ssh_health_check',
      'ssh_service_status',
      'ssh_process_manager',
      'ssh_monitor',
      'ssh_tail',
      'ssh_alert_setup'
    ],
  • Supporting utilities for alert setup including creating alert configurations with thresholds, commands to save/load alert config JSON on remote servers, and checking if current metrics exceed thresholds. These functions provide the core logic for implementing the ssh_alert_setup tool.
     */
    export function createAlertConfig(thresholds) {
      const defaults = {
        cpu: 80,
        memory: 90,
        disk: 85,
        enabled: true
      };
    
      return {
        ...defaults,
        ...thresholds,
        created_at: new Date().toISOString()
      };
    }
    
    /**
     * Build command to save alert config
     */
    export function buildSaveAlertConfigCommand(config, configPath = '/etc/ssh-manager-alerts.json') {
      const jsonData = JSON.stringify(config, null, 2);
      const escapedJson = jsonData.replace(/'/g, '\'\\\'\'');
      return `echo '${escapedJson}' > "${configPath}"`;
    }
    
    /**
     * Build command to load alert config
     */
    export function buildLoadAlertConfigCommand(configPath = '/etc/ssh-manager-alerts.json') {
      return `cat "${configPath}" 2>/dev/null || echo '{}'`;
    }
    
    /**
     * Check if thresholds are exceeded
     */
    export function checkAlertThresholds(metrics, thresholds) {
      const alerts = [];
    
      if (thresholds.cpu && metrics.cpu && metrics.cpu.percent > thresholds.cpu) {
        alerts.push({
          type: 'cpu',
          severity: 'warning',
          message: `CPU usage (${metrics.cpu.percent}%) exceeds threshold (${thresholds.cpu}%)`,
          value: metrics.cpu.percent,
          threshold: thresholds.cpu
        });
      }
    
      if (thresholds.memory && metrics.memory && metrics.memory.percent > thresholds.memory) {
        alerts.push({
          type: 'memory',
          severity: 'warning',
          message: `Memory usage (${metrics.memory.percent}%) exceeds threshold (${thresholds.memory}%)`,
          value: metrics.memory.percent,
          threshold: thresholds.memory
        });
      }
    
      if (thresholds.disk && metrics.disks) {
        for (const disk of metrics.disks) {
          if (disk.percent > thresholds.disk) {
            alerts.push({
              type: 'disk',
              severity: 'warning',
              message: `Disk usage on ${disk.mount} (${disk.percent}%) exceeds threshold (${thresholds.disk}%)`,
              mount: disk.mount,
              value: disk.percent,
              threshold: thresholds.disk
            });
          }
        }
      }
    
      return alerts;
    }
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 mentions 'configure' which implies mutation, but doesn't specify what gets configured (e.g., local settings vs remote server settings), whether changes are persistent, what permissions are required, or what happens when thresholds are exceeded. For a tool with multiple parameters and no annotation coverage, this leaves significant behavioral gaps.

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 with zero waste. It's front-loaded with the core purpose and appropriately sized for the tool's complexity. Every word earns its place without redundancy.

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 tool's complexity (6 parameters, mutation capability, no annotations, no output schema), the description is incomplete. It doesn't explain what 'configure' entails (e.g., creates alerts, modifies settings), what the tool returns (especially for 'get' and 'check' actions), or behavioral constraints. For a multi-action tool with no structured output documentation, the description should provide more context.

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%, so the schema already documents all 6 parameters thoroughly with descriptions and an enum for 'action'. The description adds no additional parameter semantics beyond implying the tool handles thresholds for CPU, memory, and disk (which the schema already details). Baseline 3 is appropriate when the schema does the heavy lifting.

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 'Configure health monitoring alerts and thresholds' clearly states the tool's purpose with a specific verb ('configure') and resource ('health monitoring alerts and thresholds'). It distinguishes this from most sibling tools which focus on SSH operations like backups, sessions, or file transfers, though it doesn't explicitly differentiate from 'ssh_health_check' which might be related.

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 (e.g., SSH access to the server), when to use 'set' vs 'get' vs 'check' actions, or how it relates to sibling tools like 'ssh_health_check' or 'ssh_monitor'. The agent must infer usage from the parameter schema alone.

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/bvisible/mcp-ssh-manager'

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