Skip to main content
Glama
phaserjs

Phaser Editor MCP Server

Official
by phaserjs

scene-declare-prefab-property

Add a new user property to a prefab scene, defining its name, type, options, and default values for game object customization.

Instructions

Create a new user property for the given prefab.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the user property. The editor compiles a prefab user property as a field of the prefab class. This name is used as variable name for that field.
typeYes
labelYesThe display name of the property. It is used in the editor to show the property name in the user interface.
sceneIdYesThe `id` of the prefab scene. The `id` is not the name of the scene, else a unique identifier is set in the scene data. You need to read the scene data to get the `id`. This id refers only to the scenes that are prefabs.
tooltipYesA very short description.
defValueNoA user property is always initialized with a default value. It could never be null or undefined. Its raw type is string, number, or boolean, but the format/syntax of the value depends on the type of the property. If the property is an array, then this property refers to the default element of the array when the user adds a new element. To set the default array, use the `defArrayValue` property. If the type is `option`, then the default value should be one of the provided options. Look the `type` property for more details.
defArrayValueNoIf the property is an array, this is the default array. If the property is not an array, this value is ignored. The type of each element of the array must follow the same rules as the `defValue` property. Look the `defValue` property for more details.
customDefinitionNoBy default, a user property is generated in code as a field. If you set this property to true, then the editor skips the generation of the field definition in code, so the user can write a custom property declaration. Most of the time the user doesn't need to do this.
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only states 'create', implying mutation, but lacks information on side effects, authentication needs, rate limits, or error conditions. The schema describes parameters but not behavioral aspects beyond creation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (one sentence), but it lacks essential context for a complex tool. While it avoids verbosity, it is too minimal to be fully helpful. It earns 3 for not being wordy but loses points for under-specification.

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?

Given the tool's complexity (8 parameters, nested objects, no output schema), the description is too sparse. It does not explain what happens after creation, return values, or any dependencies. The detailed schema partially compensates, but the description should provide overarching context.

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 88%, meaning parameters are well documented in the schema. The description adds no additional meaning to parameters, but the schema already provides detailed descriptions. 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 'Create a new user property for the given prefab' clearly states the action (create) and resource (user property for prefab). It is specific and differentiates from sibling tools like scene-delete-prefab-property, though it does not explicitly mention that the prefab must be a prefab scene. The tool name reinforces the purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites, conditions, or exclusions. Sibling tools include deletion and other operations, but no comparative context is given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/phaserjs/editor-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server