Skip to main content
Glama

apply_effect

Apply status effects like speed, strength, or invisibility to players in Minecraft servers using administrator controls for gameplay management.

Instructions

Apply a status effect to a player. Examples: speed, strength, regeneration, night_vision, invisibility, resistance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesPlayer selector
effectYesEffect ID (e.g., 'speed', 'night_vision')
durationNoDuration in seconds
amplifierNoAmplifier level (0 = level I)

Implementation Reference

  • The tool 'apply_effect' is registered and implemented in src/tools/player-tools.ts. It executes an RCON 'effect give' command.
    server.tool(
      "apply_effect",
      "Apply a status effect to a player. Examples: speed, strength, regeneration, night_vision, invisibility, resistance.",
      {
        target: z.string().describe("Player selector"),
        effect: z.string().describe("Effect ID (e.g., 'speed', 'night_vision')"),
        duration: z.number().optional().default(30).describe("Duration in seconds"),
        amplifier: z.number().optional().default(0).describe("Amplifier level (0 = level I)"),
      },
      async ({ target, effect, duration, amplifier }) => {
        try {
          const response = await manager.rcon.send(
            `effect give ${target} ${effect} ${duration} ${amplifier}`
          );
          return { content: [{ type: "text", text: response }] };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Failed: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
            isError: true,
          };

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/tamo2918/Minecraft-Server-MCP'

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