Skip to main content
Glama

Instantiate Prefab

unity_instantiate_prefab

Instantiates a prefab from an asset path into the active scene, preserving the prefab link for future overrides.

Instructions

Instantiate a prefab from an asset path into the active scene (Undo-able). Keeps the prefab link so overrides can be applied later.

Args: prefab_path ('Assets/Prefabs/Enemy.prefab'), name override (optional), position/rotation, parent_path (optional). Find prefabs first with unity_list_assets type='Prefab'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoOverride instance name (default keeps prefab name)
positionNoWorld position as [x, y, z] (default 0,0,0)
rotationNoWorld rotation euler degrees as [x, y, z] (default 0,0,0)
parent_pathNoOptional hierarchy path of the parent
prefab_pathYesProject-relative asset path, e.g. 'Assets/Prefabs/Enemy.prefab'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent, so the bar is lower; the description adds two useful traits beyond them: the operation is Undo-able and the prefab link is preserved for later overrides. It omits whether edit vs. play mode is required and what happens on a duplicate path.

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?

Front-loaded with the core action and two key behavioral facts in one sentence, then a compact Args summary and a routing hint. The Args line partially duplicates the schema, so it isn't perfectly waste-free, but nothing is padded.

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?

Covers purpose, required input discovery, side-effect profile, and prefab-link behavior for a 5-param mutation tool with no output schema. The remaining gap is the return value (instance identity/handle) and any play-mode precondition, which an agent would likely want.

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%, so every parameter including defaults (name, position, rotation, parent_path) is already documented in the schema. The description's Args line restates the same fields without adding format or constraint detail beyond the example path already in the schema. Baseline 3.

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?

States a specific verb (instantiate) and resource (prefab from asset path) plus the target scene, and the prefab-link retention clause distinguishes it from unity_create_gameobject and unity_apply_prefab. An agent can route to it without opening the schema.

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?

Explicitly routes the agent to unity_list_assets type='Prefab' to obtain the required prefab_path, which is real precondition guidance. It stops short of stating when not to use it (e.g., vs. create_gameobject or apply_prefab) and doesn't mention scene/play-mode prerequisites.

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