Skip to main content
Glama
playcanvas

PlayCanvas Editor MCP Server

Official
by playcanvas

delete_entities

Remove one or more entities from the PlayCanvas Editor by specifying their unique IDs. Ensures the root entity remains intact to maintain scene structure.

Instructions

Delete one or more entities. The root entity cannot be deleted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesArray of entity IDs to delete. The root entity cannot be deleted.

Implementation Reference

  • The handler function for the 'delete_entities' tool. It receives the list of entity IDs and proxies the delete call to the WebSocket server (wss.call('entities:delete', ids)), which forwards it to the connected editor.
    ({ ids }) => { return wss.call('entities:delete', ids); }
  • Input schema for the 'delete_entities' tool, defining 'ids' as a non-empty array of EntityIdSchema (UUID strings).
    { ids: z.array(EntityIdSchema).nonempty().describe('Array of entity IDs to delete. The root entity cannot be deleted.') },
  • MCP tool registration for 'delete_entities', specifying name, description, input schema, and handler function.
    mcp.tool( 'delete_entities', 'Delete one or more entities. The root entity cannot be deleted.', { ids: z.array(EntityIdSchema).nonempty().describe('Array of entity IDs to delete. The root entity cannot be deleted.') }, ({ ids }) => { return wss.call('entities:delete', ids); } );
  • Base Zod schema for entity IDs (UUID strings), used in the input schema for 'delete_entities'.
    export const EntityIdSchema = z.string().uuid().describe('An entity ID.');
  • src/server.ts:78-78 (registration)
    Invocation of the entity tools registration function, which includes the 'delete_entities' tool.
    registerEntity(mcp, wss);

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