Skip to main content
Glama
balloonf
by balloonf

ssh_close_all_sessions

Terminate all active SSH sessions managed by the SSH MCP Server to reset connections, ensure system security, or clear stale sessions.

Instructions

모든 SSH 세션 종료

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:307-314 (handler)
    MCP tool handler: decorated with @mcp.tool(), calls ssh_manager.close_all_sessions() and formats the response.
    @mcp.tool()
    async def ssh_close_all_sessions() -> str:
        """모든 SSH 세션 종료"""
        try:
            closed_count = await ssh_manager.close_all_sessions()
            return f"Closed {closed_count} SSH sessions"
        except Exception as e:
            return f"Failed to close sessions: {str(e)}"
  • Core implementation in SSHSessionManager: closes all sessions by iterating and calling close_session on each, returns count of closed sessions.
    async def close_all_sessions(self) -> int:
        """모든 세션 종료"""
        
        session_ids = list(self.connections.keys())
        closed_count = 0
        
        for session_id in session_ids:
            if await self.close_session(session_id):
                closed_count += 1
        
        return closed_count
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 the action (close all sessions) but doesn't describe what 'close' entails (e.g., graceful termination vs force kill), whether it requires specific permissions, if it's reversible, or what happens to active connections. For a potentially destructive operation with zero annotation coverage, this is inadequate.

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 phrase ('모든 SSH 세션 종료') that directly states the tool's purpose with zero wasted words. It's appropriately sized for a zero-parameter tool and front-loaded with the essential action.

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 a bulk operation on SSH sessions (potentially affecting multiple connections), the description is insufficient. With no annotations, no output schema, and no behavioral details, it lacks critical context about safety, permissions, effects, or return values. The agent cannot understand the full implications of using this tool.

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 schema description coverage is 100% (empty schema is fully described). The description doesn't need to explain parameters, so it meets the baseline expectation. No additional parameter semantics are required or provided.

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 '모든 SSH 세션 종료' (Close all SSH sessions) clearly states the action (close/terminate) and target resource (all SSH sessions). It's specific enough to understand the tool's function, though it doesn't explicitly differentiate from the sibling 'ssh_close_session' which likely closes individual sessions.

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_close_session' (for individual sessions) or 'ssh_list_sessions' (to view sessions first). There's no mention of prerequisites, warnings, or appropriate contexts for this bulk operation.

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

Related 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/balloonf/ssh_mcp'

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