Skip to main content
Glama
YElwiddi

Warcraft 3 MCP Server

by YElwiddi

Add a script trigger

wc3_add_trigger

Add custom JASS or Lua functions to a Warcraft 3 map script, with optional automatic execution at map initialization. Enables new in-game functionality without GUI triggers.

Instructions

Splice custom JASS/Lua into the map script and optionally wire it to run at map init. code is one or more complete function definitions; set entryFunction to the name of a zero-arg function in code to have it called during initialization. This is the reliable way to make the map DO something new in-game. Note: if the map has a GUI trigger tree and is re-saved in the World Editor, regenerated script may overwrite this; for pure custom-script maps it is fully durable. Saves the map.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mapPathYesAbsolute path to the .w3x/.w3m map file
codeYesComplete JASS/Lua function definition(s) to add
entryFunctionNoName of a zero-arg function in `code` to call at map init; omit to only append
outPathNoOutput map path. Defaults to "<map>.edited.<ext>" beside the source; pass the source path to overwrite in place.
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that the tool saves the map (a side effect), and notes the overwrite risk with GUI maps. However, it does not mention whether previous triggers are preserved, what happens on error, or any permission requirements. The behavioral detail is adequate but not exhaustive.

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 concise: three sentences with no redundancy. The first sentence states the core action, the second explains key parameters, and the third adds a critical caveat. Every sentence earns its place.

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

Completeness3/5

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

The description covers the main purpose and parameters, and warns about GUI maps. However, it does not describe the return value (e.g., success/failure message) or error handling. Given the tool's complexity (4 params, no output schema), a bit more detail about outcomes would improve completeness.

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

Parameters4/5

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

All four parameters are covered in the schema (100% coverage), but the description adds meaningful context: 'code' is 'complete function definitions', entryFunction must be a 'zero-arg function' name, and outPath defaults to a specific pattern. This enriches the schema beyond mere definitions.

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 uses specific verbs ('splice', 'wire', 'call') and clearly identifies the resource ('JASS/Lua into map script'). It distinguishes itself from sibling tools like wc3_write_script by focusing on incremental insertion with an optional entry point. The phrase 'reliable way to make the map DO something new in-game' reinforces its unique value.

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

Usage Guidelines4/5

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

The description explains when to use this tool (to add custom script and optionally run at init) and provides a caveat about GUI maps potentially overwriting changes. It implicitly contrasts with the full-script replacement sister tool wc3_write_script. However, it does not explicitly list alternatives or state exclusion criteria (e.g., 'don't use if you need to modify existing triggers').

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

Install Server

Other Tools

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/YElwiddi/warcraft-3-mcp-server'

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