modify_entities
Edit properties of one or more entities in real-time 3D web applications using dot notation for nested property paths, enabling precise adjustments within the PlayCanvas Editor environment.
Instructions
Modify one or more entity's properties
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | An array of objects containing the ID of the entity to modify, the path to the property to modify, and the value to set the property to. |
Implementation Reference
- src/tools/entity.ts:33-35 (handler)Handler function for the 'modify_entities' tool. It receives the 'edits' parameter and forwards it to the WebSocket server via wss.call('entities:modify', edits).({ edits }) => { return wss.call('entities:modify', edits); }
- src/tools/entity.ts:26-32 (schema)Input schema for the 'modify_entities' tool, defining an array of edits with entity ID, property path, and new value.{ edits: z.array(z.object({ id: EntityIdSchema, path: z.string().describe('The path to the property to modify. Use dot notation to access nested properties.'), value: z.any().describe('The value to set the property to.') })).nonempty().describe('An array of objects containing the ID of the entity to modify, the path to the property to modify, and the value to set the property to.') },
- src/tools/entity.ts:23-36 (registration)Registration of the 'modify_entities' tool using mcp.tool(), including name, description, input schema, and handler function.mcp.tool( 'modify_entities', 'Modify one or more entity\'s properties', { edits: z.array(z.object({ id: EntityIdSchema, path: z.string().describe('The path to the property to modify. Use dot notation to access nested properties.'), value: z.any().describe('The value to set the property to.') })).nonempty().describe('An array of objects containing the ID of the entity to modify, the path to the property to modify, and the value to set the property to.') }, ({ edits }) => { return wss.call('entities:modify', edits); } );