Skip to main content
Glama

unity_prefab

Instantiate a prefab into the Unity scene or save a GameObject as a prefab asset, enabling scene assembly and reusable object creation.

Instructions

Instantiate a prefab into the scene or save a GameObject as a prefab. (Unity editor offline right now: schemas are cached; calls will fail until it reconnects)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>",
      "path": "<path>"
    },
    "name": "unity_prefab"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesprefab asset path
actionYes
parentNo
targetNofor save: GameObject path

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/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 does add one genuinely valuable non-obvious fact: the editor is currently offline, schemas are cached, and calls will fail until reconnection. That is strong operational context. It still omits key behavior for a mutation tool — notably whether 'save' overwrites an existing prefab at the given path, what happens on partial failure, and what the caller gets back.

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 tight sentences with the core capability front-loaded and the operational warning clearly separated in parentheses. No filler or repetition. Slightly terse given the tool has two distinct modes that could each use a clause.

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 a 4-parameter, no-output-schema, no-annotation mutation tool, the description covers the dual purpose and the offline condition but leaves gaps: the 'parent' parameter is never explained, overwrite semantics for 'save' are unstated, and there is no hint of what a successful call returns (e.g., the created instance reference).

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 50%, so the schema documents 'path' and 'target' but leaves 'action' and 'parent' undocumented there. The description compensates partially by explaining the instantiate/save split, which gives the enum meaning, but it never mentions 'parent' at all, leaving one of four parameters unexplained in both places. Baseline 3 is appropriate.

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?

The description names two specific operations with clear verbs and resources: instantiating a prefab asset into the scene and saving a GameObject as a prefab asset. An agent can immediately tell what the tool does. It does not, however, distinguish itself from nearby siblings such as unity_create or unity_asset_info, so it falls short of a 5.

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 two modes are described well enough that an agent can infer which action value to pick for its goal. There is no explicit when-to-use guidance against alternatives (e.g., creating objects via unity_create instead), no stated prerequisites such as the prefab needing to exist on disk, and no exclusions.

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