Skip to main content
Glama

Create a prefab

prefab_create
Destructive

Creates a prefab in a module's Prefabs XML from a scene entity or game_entity XML, resetting position to origin unless keep_position is set.

Instructions

Saves a prefab into /Prefabs/_prefabs.xml from a scene entity (from_scene + entity; its position is reset to the origin) or from <game_entity> XML. The editor loads module prefabs at startup (restart it to see new ones).

Input Schema

NameRequiredDescriptionDefault
xmlNoAlternatively a complete <game_entity> element.
nameYesPrefab name (unique across modules).
entityNoHandle or name of the entity in from_scene.
moduleYesWritable module.
overwriteNoReplace an existing prefab with this name in the same module.
from_sceneNoScene that contains the source entity.
keep_positionNoKeep the entity's position instead of moving it to the origin (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false. The description goes beyond them by disclosing that the entity position is reset to the origin, the destination file, and that the editor only picks up new prefabs at startup (a restart is required) — genuinely useful operational context.

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 primary action and destination front-loaded, followed by the source-mode detail and the startup caveat. Dense with useful detail rather than 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?

For a destructive create tool with full annotation coverage and no output schema, the description supplies the destination path, dual input modes, and the restart requirement. Minor gaps remain around error handling and how overwrite interacts with an existing prefab.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so the baseline is 3, but the description adds relational meaning the flat schema lacks: that from_scene and entity are used together as a pair and that position resets unless keep_position is set, clarifying how the source-mode parameters combine.

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?

Uses a specific verb (Saves) and resource (prefab) and names the exact output file path and the two source modes (scene entity or game_entity XML). The purpose is unambiguous, though it never explicitly contrasts itself with the sibling prefab_search.

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 source modes (from_scene + entity vs. xml) imply when each input applies, and the startup-load note hints at the workflow context, but there is no explicit when-to-use/when-not guidance or reference to any alternative tool.

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