Skip to main content
Glama
alexneargarder

unity-inspector-mcp

unload_script

Unload an active C# script, cleaning up its Harmony patches, GameObjects, and calling its Unload() method if defined.

Instructions

Unload an active C# script, cleaning up its Harmony patches, GameObjects, and calling its Unload() method if defined.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the script to unload

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it discloses the key side effects: Harmony patch cleanup, GameObject cleanup, and invocation of Unload() when present. It does not specify behavior for inactive/nonexistent scripts or whether unloading is reversible, which keeps it from a 5.

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 sentence that front-loads the action and then lists only necessary cleanup consequences. There is no filler or repetition of schema content.

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

Completeness4/5

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

For a one-parameter tool with no output schema, this is nearly complete: it names the target, the action, and the side effects. It would be fully complete with a note on error/return behavior when the specified script is not active or does not exist.

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 coverage is 100% and the single parameter is documented as 'Name of the script to unload', so the description adds no extra parameter-level detail. The baseline of 3 is appropriate because the schema fully handles parameter semantics.

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 a specific verb ('Unload') and resource ('active C# script'), and adds concrete cleanup details that separate it from script lifecycle siblings like compile_script and execute_script. It is immediately obvious what the tool does and which operation it targets.

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 word 'active' establishes a clear precondition: this is for scripts that have already been loaded and are currently running. No alternative unload tool exists among siblings, so the usage context is clear, although explicit when-not-to-use guidance is not provided.

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