server_update
Update Minecraft server configuration settings including name, ports, auto-start, crash detection, and stop commands.
Instructions
Update a Minecraft server's configuration (name, ports, auto-start, crash detection, stop command, etc.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server_id | Yes | Server ID or UUID | |
| updates | Yes | Configuration fields to update |
Implementation Reference
- src/tools/servers.ts:94-110 (handler)The "server_update" tool is registered and implemented directly in src/tools/servers.ts. The handler uses the CraftyClient to perform a PATCH request to /servers/${server_id} with the provided updates.
server.tool( "server_update", "Update a Minecraft server's configuration (name, ports, auto-start, crash detection, stop command, etc.)", { server_id: z.string().describe("Server ID or UUID"), updates: z.record(z.string(), z.unknown()).describe("Configuration fields to update"), }, async ({ server_id, updates }) => { try { const data = await client.patch(`/servers/${server_id}`, updates); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true }; } } );