Skip to main content
Glama
playcanvas

PlayCanvas Editor MCP Server

Official
by playcanvas

add_entity_scripts

Idempotent

Attach registered scripts to multiple entities, automatically creating script components when absent to enable gameplay behavior.

Instructions

Attach a parsed script to one or more entities, creating script components when needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNoExecution order index
scriptYesRegistered script name
entityIdsYes
attributesNo
Behavior3/5

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

Annotations already declare idempotentHint=true, readOnlyHint=false, and destructiveHint=false. The description adds useful behavioral context by noting that script components are created when needed and that the script must be parsed. However, it stops short of explaining what happens to existing scripts, how attributes are applied, or whether repeated calls simply overwrite.

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

Conciseness5/5

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

The description is a single sentence that wastes no words and front-loads the core action. It is appropriately sized for the tool's complexity and does not repeat schema details.

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 four parameters, a nested attributes object, and no output schema, the description is too thin. It does not explain the purpose of attributes, the meaning of the execution-order index, or how this tool relates to the many similar script/component tools in the sibling list. An agent could call it with required parameters but would lack enough context to use optional parameters confidently.

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 only 50%, and the description partially compensates: 'one or more entities' clarifies entityIds, and 'parsed script' adds meaning beyond the schema's 'Registered script name'. However, the optional 'index' and especially 'attributes' parameters receive no semantic help from the description, leaving their roles partially underspecified.

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 action ('attach a parsed script to one or more entities') and includes the key side effect of creating script components when needed. It is clear about the resource and target, but it does not explicitly differentiate itself from similar sibling tools such as attach_script or add_script_component_script.

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?

There is no guidance about when to use this tool versus alternatives like attach_script, add_script_component_script, or add_components. The description implies a use case but provides no exclusions, prerequisites, or decision criteria.

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/playcanvas/editor-mcp-server'

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