Skip to main content
Glama

disconnectFromServer

Terminates the current connection to the Minecraft server, allowing users to safely end remote sessions and exit the game. Useful for managing remote server access and control.

Instructions

Disconnect from the Minecraft server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'disconnectFromServer' tool. It checks if the bot is connected, quits the bot if so, updates the connection state, and returns appropriate success or error responses.
    async () => { if (!botState.isConnected || !botState.bot) { return createNotConnectedResponse() } try { botState.bot.quit() updateConnectionState(false, null) return createSuccessResponse( 'Successfully disconnected from the server.' ) } catch (error) { return createErrorResponse(error) } }
  • The registration of the 'disconnectFromServer' tool using server.tool(), specifying the name, description, empty schema (no parameters), and the handler function.
    server.tool( 'disconnectFromServer', 'Disconnect from the Minecraft server', {}, async () => { if (!botState.isConnected || !botState.bot) { return createNotConnectedResponse() } try { botState.bot.quit() updateConnectionState(false, null) return createSuccessResponse( 'Successfully disconnected from the server.' ) } catch (error) { return createErrorResponse(error) } } )
  • The schema for the 'disconnectFromServer' tool, which is empty as it takes no parameters.
    {},

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/nacal/mcp-minecraft-remote'

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