Skip to main content
Glama

give_item

Distribute items to Minecraft players using player selectors and item IDs. Specify target players and item types to manage in-game resources.

Instructions

Give items to a player. Examples: 'diamond', 'diamond_sword', 'golden_apple'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesPlayer selector (e.g., '@a', '@p', 'PlayerName')
itemYesItem ID (e.g., 'diamond', 'netherite_sword')
countNoNumber of items

Implementation Reference

  • The handler function for the 'give_item' tool, which executes an RCON 'give' command.
    async ({ target, item, count }) => {
      try {
        const response = await manager.rcon.send(
          `give ${target} ${item} ${count}`
        );
        return { content: [{ type: "text", text: response }] };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Failed: ${error instanceof Error ? error.message : String(error)}`,
  • Registration of the 'give_item' tool with its schema definition.
    server.tool(
      "give_item",
      "Give items to a player. Examples: 'diamond', 'diamond_sword', 'golden_apple'.",
      {
        target: z.string().describe("Player selector (e.g., '@a', '@p', 'PlayerName')"),
        item: z.string().describe("Item ID (e.g., 'diamond', 'netherite_sword')"),
        count: z.number().optional().default(1).describe("Number of items"),
      },

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