Skip to main content
Glama

disconnectFromServer

Terminate the connection to the Minecraft server managed by MCP Minecraft Remote, ending remote control and interaction sessions.

Instructions

Disconnect from the Minecraft server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that disconnects the bot from the Minecraft server by calling bot.quit(), updating the connection state, and returning appropriate 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) } }
  • Registers the 'disconnectFromServer' tool with its description, empty input schema, and inline handler function within registerConnectTools.
    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) } } )

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