Skip to main content
Glama

pool_stats

Monitor SSH connection pool statistics to track active sessions, available connections, and resource usage for remote server management.

Instructions

Affiche les statistiques du pool de connexions SSH persistantes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • server.js:617-628 (registration)
    Registers the MCP tool 'pool_stats' with empty input schema and an inline handler that calls ssh.getPoolStats() to retrieve and format pool statistics.
    server.registerTool( "pool_stats", { title: "Statistiques du pool de connexions SSH", description: "Affiche les statistiques du pool de connexions SSH persistantes.", inputSchema: z.object({}) }, async () => { const stats = ssh.getPoolStats(); return { content: [{ type: "text", text: `Pool de connexions SSH:\n${JSON.stringify(stats, null, 2)}` }] }; } );
  • Helper function getPoolStats() in ssh.js that delegates to the SSH pool's getStats() method.
    function getPoolStats() { return sshPool.getStats(); }
  • Core handler logic in SSHConnectionPool.getStats(): computes detailed statistics including total connections and per-server breakdown with usage status.
    getStats() { const stats = { totalConnections: this.activeConnections.size, byServer: {} }; for (const [serverAlias, pool] of this.pools) { const connections = pool.map(connId => { const info = this.activeConnections.get(connId); return { id: connId, inUse: info?.inUse || false, ready: info?.conn?.isReady || false, lastUsed: info?.lastUsed }; }); stats.byServer[serverAlias] = { total: connections.length, inUse: connections.filter(c => c.inUse).length, available: connections.filter(c => !c.inUse && c.ready).length, connections }; } return stats; }

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/fkom13/mcp-sftp-orchestrator'

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