Skip to main content
Glama

delete_prim

Destructive

Deletes a USD prim and its children by removing the stage edit-layer entry at the given path; refuses prims owned by other layers or references, so hide those with set_visibility.

Instructions

Delete a prim and everything under it, by removing what the stage's edit layer holds at that path.

A prim another layer defines too, or one a reference or payload on a prim above brings, such as a part of a referenced asset, can't be deleted this way: the call is refused, saying why, and nothing changes; set_visibility hides such a prim, or its instance for a prim inside one. Kit's undo doesn't record the delete, and the file on disk keeps the prim until save_scene. An error when no prim is there.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prim_path": "<prim_path>"
    },
    "name": "delete_prim"
  }
}

Input Schema

NameRequiredDescriptionDefault
prim_pathYesFull USD path of the prim, e.g. "/World/Robot"

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, but the description adds several traits they cannot express: the refusal is atomic ("nothing changes"), the error message explains why, Kit's undo does not record the delete, and the on-disk file keeps the prim until save_scene. It also notes an error when the prim is absent. This is exactly the extra context the annotation bar asks for.

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

Conciseness4/5

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

Front-loaded with the action and mechanism, then failure modes, then persistence caveats—a sensible order with no filler. The second sentence is convoluted ("one a reference or payload on a prim above brings, such as a part of a referenced asset") and could be tightened without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive single-param tool with an output schema, the description covers everything an agent needs before calling: what is deleted (including descendants), what blocks deletion, irreversibility via undo, and the required follow-up save. Return values are handled by the output schema, so nothing material is missing.

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?

The schema has one required parameter with 100% description coverage including a concrete example ("/World/Robot"), so the baseline is 3. The description refers to "that path" but adds no format or validation detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Delete a prim and everything under it") plus the exact mechanism ("removing what the stage's edit layer holds at that path"). An agent can distinguish this from set_visibility or save_scene without consulting any schema.

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

Usage Guidelines5/5

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

Explicitly enumerates the cases where the call is refused (prim defined by another layer, brought in by a reference or payload) and names the alternative, set_visibility, for those cases. It also points at save_scene as the step needed to persist the change, so both when and when-not are covered.

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