Skip to main content
Glama
Mai-xiyu

Minecraft 1.21.1 Forge/NeoForge MCP Server

by Mai-xiyu

generate_event_handler

Generate a Forge or NeoForge event handler class for any Minecraft event. Specify the event class, mod ID, package, and bus to get ready-to-use code.

Instructions

Generate an event handler class for a specific event.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
busNoEvent bus (MOD for lifecycle events, GAME/FORGE for gameplay events)GAME
modIdYesMod ID
loaderYesTarget mod loader
eventClassYesFull event class name (e.g. net.minecraftforge.event.level.BlockEvent.BreakEvent)
packageNameYesJava package

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of disclosing side effects. It only says 'Generate' with no mention of whether the tool writes a file, returns code, requires existing project context, or overwrites existing files. This is minimal behavioral disclosure for a code-generation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single focused sentence with no filler, and the core verb 'Generate' plus resource type appear immediately. It is appropriately sized for the information it conveys.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with five parameters, no output schema, and no annotations, the description is too thin. It does not explain what the generated handler will contain, where it will be written, how bus selection affects the result, or what the agent should expect as a return value.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters including the bus enum meanings and eventClass format. The description adds no extra parameter nuance beyond the schema, which matches the baseline for full coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Generate'), a clear resource ('event handler class'), and a scoping condition ('for a specific event'). This distinguishes it from sibling generators such as generate_block, generate_item, and generate_entity,all of which target different artifact types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use when an event handler class is needed, and the sibling list contains search_events and get_event_detail for research versus generate_event_handler for creation. However, it provides no explicit guidance on when to choose this tool over other generate_* tools or when to use search/API tools first.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.