Skip to main content
Glama
d3v1an
by d3v1an

ssh_shell_close

Closes an interactive SSH shell session to release server resources and terminate remote connections.

Instructions

Cierra una sesión de shell interactiva y libera recursos

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesID de la sesión de shell a cerrar

Implementation Reference

  • The handleShellClose method implements the logic for closing an SSH shell session.
    private async handleShellClose(args: any): Promise<CallToolResult> {
      this.requireConnection();
      const sessionId = args.sessionId as string;
    
      const session = this.shellSessions.get(sessionId);
      if (!session) {
        throw new Error(`Sesión "${sessionId}" no encontrada.`);
      }
    
      this.destroyShellSession(sessionId, session);
      this.audit("ssh_shell_close", `sessionId=${sessionId}`, "ok");
    
      return {
        content: [{ type: "text", text: `Sesión "${sessionId}" cerrada.` }],
      };
  • src/tools.ts:262-273 (registration)
    Registration of the ssh_shell_close tool with its description and input schema.
    name: "ssh_shell_close",
    description: "Cierra una sesión de shell interactiva y libera recursos",
    inputSchema: {
      type: "object",
      properties: {
        sessionId: {
          type: "string",
          description: "ID de la sesión de shell a cerrar",
        },
      },
      required: ["sessionId"],
    },

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

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