Skip to main content
Glama

instantiate_prefab

Spawn a Unity prefab into the active scene from an asset path, with optional position, rotation, scale, parent, and name settings.

Instructions

Instantiate a prefab in the Unity scene. Use the full asset path like "Assets/Prefabs/MyPrefab.prefab". Requires BanterMCPBridge extension.

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": {
      "prefabPath": "<prefabPath>"
    },
    "name": "instantiate_prefab"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoOptional: rename the instantiated object
scaleNoScale as [x, y, z]
parentIdNoPreferred: parent globalObjectId from scene-hierarchy.json
positionNoPosition as [x, y, z]
rotationNoRotation in euler angles as [x, y, z]
parentPathNoPath to parent object
prefabPathYesAsset path to the prefab (e.g., 'Assets/Prefabs/House.prefab')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.7.7

TDQS

B3.3/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 behavioral burden, and it does add one genuinely useful fact: "Requires BanterMCPBridge extension" discloses a runtime prerequisite. Beyond that it is silent on what the call returns (e.g., the new object's globalObjectId), what happens if the prefab path does not resolve, and whether the operation is undoable.

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?

Three short lines with the core action front-loaded and no filler. The path-format line is slightly duplicative of the schema's prefabPath example, which keeps it from a 5, but it is still useful reinforcement for the single required parameter.

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

Completeness2/5

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

For a seven-parameter mutation tool with no annotations and no output schema, the description says almost nothing about results or failure modes, so an agent cannot tell whether it can chain into modify_gameobject with a returned ID. The parentId-versus-parentPath precedence also goes unmentioned, leaving a real ambiguity unresolved.

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%, so all seven parameters, including the required prefabPath with its own example, are already documented. The description repeats the full-asset-path convention with an example rather than adding new meaning, which meets the baseline 3 but does not exceed it.

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 states a specific verb and resource ("Instantiate a prefab in the Unity scene") that an agent can map directly to the name. It is clear on its own, but it never acknowledges the sibling batch_instantiate_prefabs, so the boundary between single and batch instantiation is left to the agent to infer.

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?

Usage is only implied by the tool name and the phrase "in the Unity scene"; there is no explicit when-to-use or when-not-to-use statement. In particular, nothing tells the agent to prefer batch_instantiate_prefabs when placing multiple prefabs, which is the most likely selection mistake.

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