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);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It correctly indicates this is a destructive operation ('Delete'), but doesn't specify permissions required, whether deletions are permanent or reversible, error handling for invalid IDs, or any rate limits. The root entity constraint is useful, but overall behavioral context is minimal for a destructive tool.

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 extremely concise (two sentences) with zero wasted words. The first sentence states the core purpose, and the second adds the critical constraint. Every sentence earns its place, and information is front-loaded appropriately.

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?

For a destructive tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after deletion (e.g., confirmation, error responses), permissions needed, or how to verify deletions. The root entity constraint is helpful, but overall completeness is poor given the tool's complexity and lack of structured support.

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 100%, so the schema fully documents the 'ids' parameter (array of UUIDs, minItems: 1). The description repeats the root entity constraint already in the schema description, adding no new parameter semantics. This meets the baseline of 3 when schema coverage is high.

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 clearly states the verb ('Delete') and resource ('entities'), specifying it can handle multiple entities ('one or more'). It distinguishes from sibling tools like 'delete_assets' by focusing on entities rather than assets. However, it doesn't explicitly differentiate from other destructive operations like 'remove_components' beyond the resource type.

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 description provides one explicit exclusion ('The root entity cannot be deleted'), which helps guide usage. However, it doesn't specify when to use this tool versus alternatives like 'delete_assets' or 'remove_components', nor does it mention prerequisites or recovery options. The guidance is implied but incomplete.

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

Related 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