Skip to main content
Glama

object_remove

Deletes a scene object and its children (undoable), then compares scene references to identify project resources that become unused; optionally deletes those orphaned resources.

Instructions

删除一个场景对象(含子对象,可撤销),并找出只被它使用的工程资源:删除前后对比场景引用,删除前被引用、删除后不再被引用的即为孤儿(unused_paths 已合并到素材包文件夹,只含磁盘上存在的路径)。editor_only_paths 是素材放进场景时编辑器按对象名建的文件夹(如「复古清冷_滤镜」),只在编辑器里、尚未写到磁盘,对象删除后下次保存就会消失,不用删。delete_unused_resources=true 时一并删除 unused_paths(资源删除不可撤销);默认只报告,可之后用 resource_delete_unused 删除。object_path 用完整层级路径或能唯一定位的末尾几段(渲染组本身请用官方 delete_render_group)。只删对象、不关心资源时官方 edit_by_dsl 也能删;要知道删完哪些资源没人用了,用本工具。

Input Schema

NameRequiredDescriptionDefault
instance_idNo官方 list_instances 返回的 instance_id,与 project_path 二选一。
object_pathYes对象的层级路径,如「面部拉伸/小屁桃_美型」,或能唯一定位的末尾几段。
project_pathNo目标工程的绝对路径。与 instance_id 二选一;只开了一个工程窗口时都可省略。
delete_unused_resourcesNo同时删除孤儿资源,默认 false(只报告)。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does so well: it discloses that child objects are removed, that the object deletion is undoable, that resource deletion is NOT undoable, and that the default is report-only. It also explains editor_only_paths are editor-side artifacts that vanish on next save and must not be deleted, plus that unused_paths only contain paths existing on disk — behavior an agent could not infer from any structured field.

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?

The core action and its scope are front-loaded and every sentence carries distinct information. However, the definition is one dense run-on paragraph with stacked parentheticals covering deletion, orphan detection, editor folders, and sibling routing, which makes it harder to scan than a short structured list would be.

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?

There is no output schema, so the description must explain return values, and it does: it defines unused_paths, editor_only_paths, and the report-vs-delete outcome of the flag. For a destructive, two-mode tool this covers everything an agent needs before invoking it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline would be 3, but the description adds real meaning: object_path accepts a full hierarchy path or unique trailing segments (with a concrete example), and delete_unused_resources is characterized as destructive and off by default. instance_id and project_path are left entirely to the schema, which is acceptable given full coverage.

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?

The opening clause gives a specific verb and resource ('删除一个场景对象(含子对象,可撤销)') and immediately extends it to the orphan-resource discovery behavior, which is the tool's real differentiator. It names the siblings it is not (delete_render_group, edit_by_dsl, resource_delete_unused), so an agent can distinguish it without opening the 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?

Explicit routing is provided for every adjacent case: render groups go to the official delete_render_group, object-only deletion can use edit_by_dsl, and deferred resource cleanup uses resource_delete_unused. The default-vs-opt-in behavior of delete_unused_resources is also stated, so the agent knows when to set it.

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