Skip to main content
Glama
bvisible

MCP SSH Manager

ssh_service_status

Check the operational status of specified services on a remote server to monitor system health and availability.

Instructions

Check status of services on remote server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverYesServer name
servicesYesService names to check (e.g., nginx, mysql, docker)

Implementation Reference

  • 'ssh_service_status' is registered in the monitoring tool group, used for conditional tool enablement based on user configuration.
    monitoring: [
      'ssh_health_check',
      'ssh_service_status',
      'ssh_process_manager',
      'ssh_monitor',
      'ssh_tail',
      'ssh_alert_setup'
    ],
  • Helper function to build shell command for checking service status, supporting both systemd and legacy sysv init systems.
    export function buildServiceStatusCommand(serviceName) {
      // Try systemd first, fallback to sysv
      return `
        if command -v systemctl >/dev/null 2>&1; then
          systemctl is-active ${serviceName} 2>/dev/null >/dev/null && echo "ACTIVE" || echo "INACTIVE"
          systemctl is-enabled ${serviceName} 2>/dev/null >/dev/null && echo "ENABLED" || echo "DISABLED"
          systemctl status ${serviceName} 2>/dev/null | grep "Main PID" | awk '{print $3}' | cut -d'(' -f1
          systemctl status ${serviceName} 2>/dev/null | grep "Active:" | sed 's/.*Active: //' | awk '{print $1,$2,$3}'
        elif command -v service >/dev/null 2>&1; then
          service ${serviceName} status >/dev/null 2>&1 && echo "ACTIVE" || echo "INACTIVE"
          echo "UNKNOWN"
          pgrep -f ${serviceName} | head -1 || echo ""
          echo "sysv"
        else
          echo "UNKNOWN"
          echo "UNKNOWN"
          echo ""
          echo "no-init-system"
        fi
      `.trim();
    }
  • Helper function to parse service status command output into structured data including status, enabled state, PID, and health assessment.
    export function parseServiceStatus(output, serviceName) {
      const lines = output.trim().split('\n');
      const [status, enabled, pid, details] = lines;
    
      return {
        name: serviceName,
        status: status === 'ACTIVE' ? 'running' : 'stopped',
        enabled: enabled === 'ENABLED' ? 'yes' : enabled === 'DISABLED' ? 'no' : 'unknown',
        pid: pid && pid !== '' ? parseInt(pid) : null,
        details: details || 'unknown',
        health: status === 'ACTIVE' ? HEALTH_STATUS.HEALTHY : HEALTH_STATUS.CRITICAL
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions remote server checking but doesn't specify authentication requirements, timeout behavior, error handling, output format, or whether this is a read-only operation. For a tool that interacts with remote systems, this leaves significant gaps in understanding how it behaves.

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 communicates the core purpose without any wasted words. It's appropriately sized for a straightforward tool and gets directly to the point with no unnecessary elaboration.

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?

For a tool that performs remote operations with no annotations and no output schema, the description is insufficient. It doesn't explain what the status check returns (e.g., running/stopped, uptime, error messages), how results are formatted, or any system requirements. The combination of remote execution complexity and lack of structured documentation means 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%, with both parameters ('server' and 'services') having clear descriptions in the schema. The tool description adds no additional parameter semantics beyond what's already documented in the structured schema, so it meets the baseline expectation but doesn't provide extra value.

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 verb ('Check status') and resource ('services on remote server'), making the purpose immediately understandable. It doesn't specifically differentiate from sibling tools like 'ssh_health_check' or 'ssh_connection_status', but the focus on service status is reasonably distinct within the SSH tool family.

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 like 'ssh_health_check' (which might include service status) or 'ssh_execute' (which could run custom status commands). There's no mention of prerequisites, limitations, or typical use cases beyond the basic purpose.

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