Skip to main content
Glama

set_module_scripts

Idempotent

Assign or clear module-level event scripts in the IFO, including on-load, heartbeat, and player event handlers. Pass an empty string to remove a script.

Instructions

Set event scripts on the module IFO. Pass empty string to clear a script.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "set_module_scripts"
  }
}

Input Schema

NameRequiredDescriptionDefault
Mod_OnModLoadNoOnModuleLoad script
Mod_OnPlrChatNoOnPlayerChat script
Mod_OnPlrRestNoOnPlayerRest script
Mod_OnModStartNoOnModuleStart script
Mod_OnPlrDeathNoOnPlayerDeath script
Mod_OnPlrDyingNoOnPlayerDying script
Mod_OnPlrEqItmNoOnPlayerEquipItem script
Mod_OnPlrLvlUpNoOnPlayerLevelUp script
Mod_OnActvtItemNoOnActivateItem script
Mod_OnHeartbeatNoOnHeartbeat script
Mod_OnAcquirItemNoOnAcquireItem script
Mod_OnClientEntrNoOnClientEnter script
Mod_OnClientLeavNoOnClientLeave script
Mod_OnCutsnAbortNoOnCutsceneAbort script
Mod_OnPlrUnEqItmNoOnPlayerUnEquipItem script
Mod_OnSpawnBtnDnNoOnSpawnButtonDown script
Mod_OnUnAqreItemNoOnUnAcquireItem script
Mod_OnUsrDefinedNoOnUserDefined script

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

B3.2/5.0
Behavior2/5

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

Annotations supply only idempotentHint, so the description carries most of the behavioral burden. It discloses the clear-a-script convention but says nothing about whether omitted parameters preserve existing handlers or wipe them, whether changes require a save/compile step, or what permissions are needed for a mutation of module state.

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

Conciseness4/5

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

Two short sentences, front-loaded with the action and followed immediately by the clearing rule. No filler, though the extreme brevity leaves real behavioral questions unaddressed rather than wasted wording.

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?

For an 18-parameter mutation tool with thin annotations and no output schema, the definition is minimal but not inadequate — an agent can form the call. It stops short on partial-update semantics, validation of script names, and post-write requirements, which matter given the tool's complexity.

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% and each of the 18 parameters already names its NWScript event hook, so the schema does the heavy lifting. The description adds one genuinely new semantic rule — empty string clears a script — which is the only meaning beyond the schema, matching the baseline.

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

Purpose4/5

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

States a specific verb and resource: sets event scripts on the module IFO. The mention of 'module IFO' and 'event scripts' makes it distinguishable from area-level siblings such as set_area_scripts, though the description never names alternatives explicitly.

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?

Implied usage is clear enough (assign module-level event handler scripts), and the empty-string clearing idiom is a concrete usage rule. There is no guidance on when to prefer this over sibling tools, nor any stated prerequisite such as the script needing to exist or compile.

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

Deploy Server

Other Tools