Skip to main content
Glama
fkom13

MCP SFTP Orchestrator

by fkom13

Statistiques du pool de connexions SSH

pool_stats

View statistics for persistent SSH connection pools to monitor active sessions, usage patterns, and connection health within the SFTP orchestration system.

Instructions

Affiche les statistiques du pool de connexions SSH persistantes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'pool_stats': calls ssh.getPoolStats() and returns formatted statistics as text content.
    async () => {
        const stats = ssh.getPoolStats();
        return { content: [{ type: "text", text: `Pool de connexions SSH:\n${JSON.stringify(stats, null, 2)}` }] };
    }
  • Tool specification including title, description, and empty input schema (z.object({})).
    {
        title: "Statistiques du pool de connexions SSH",
        description: "Affiche les statistiques du pool de connexions SSH persistantes.",
        inputSchema: z.object({})
    },
  • server.js:617-628 (registration)
    Registration of the 'pool_stats' MCP tool, including schema and inline handler.
    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() exported from ssh.js, acting as a wrapper to sshPool.getStats().
    // Obtenir les stats du pool
    function getPoolStats() {
        return sshPool.getStats();
    }
  • Core implementation of getStats() in SSHConnectionPool class, computing detailed statistics on connections by server.
    // Obtenir les statistiques du pool
    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;
    }
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 this is a display/read operation but doesn't mention important behavioral aspects like whether it requires specific permissions, what format the statistics are returned in, if there are rate limits, or if the data is real-time versus cached. For a stats tool with zero annotation coverage, this is insufficient.

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 in French that directly states what the tool does. It's appropriately sized for a simple tool with no parameters and gets straight to the point without any unnecessary elaboration.

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 (no parameters, no output schema, no annotations), the description is minimally adequate. It tells you what the tool does but doesn't provide enough context about what statistics are returned, their format, or behavioral considerations. For a stats tool with no output schema, more information about the return value would be helpful.

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 zero parameters, and the input schema has 100% description coverage (though empty). The description appropriately doesn't waste space discussing parameters that don't exist. A baseline of 4 is appropriate for zero-parameter tools where the schema fully documents the absence of inputs.

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 ('Affiche' meaning 'Displays') and resource ('statistiques du pool de connexions SSH persistantes'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'queue_stats' or 'get_system_resources' that also provide statistical information, which prevents a perfect 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. There are multiple sibling tools that provide various statistics (e.g., 'queue_stats', 'get_system_resources', 'get_services_status'), but the description doesn't indicate when SSH connection pool statistics are specifically needed or when other tools might be more appropriate.

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

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