Skip to content

[MEDIUM] dump_scene_graph lacks node/property/response bounds and overwhelms AI clients #196

Description

@Daliys

Problem

dump_scene_graph limits recursive depth but has no GameObject/node count, component/property count, serialized-property depth, or response-size budget. With include_all_properties: true, every component on every traversed object is serialized, including recursively expanded arrays, managed references, and generic properties. Large scenes can therefore produce responses too large for practical AI use.

Evidence

  • Editor/MCPServerMethods.Snapshot.cs:26-31 supports root_id, max_depth, and include_all_properties, but no node cap.
  • Editor/MCPServerMethods.Snapshot.cs:65-92 serializes every traversed object and component.
  • Editor/MCPServerMethods.Snapshot.cs:126-147 serializes every property when full properties are enabled.
  • Editor/MCPServerMethods.Serialization.Properties.cs:70+ recursively expands serialized properties without a scene-dump budget.
  • compact_scene_snapshot is a useful workaround, but it still has depth-only traversal and no truncation metadata.
  • The consolidated bridge schema does not advertise the compact scene-dump path.
  • Scene-dump tests are only success-routing smoke coverage; they do not test bounds, truncation, or oversized responses.

Existing mitigations

Targeted get_game_object/component reads and compact snapshots reduce payloads, and UI Toolkit traversal has explicit depth/result caps. Those mitigations do not bound recursive scene-dump output.

Suggested direction

Add max_objects/ max_nodes, a serialized-property budget, and explicit truncation metadata. Preserve compact mode as the recommended overview, expose it through the bridge schema, and document the targeted follow-up workflow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageImported or reported issue awaiting owner reviewpriority: mediumImportant defect or workflow gap with workaroundsurface: json-rpcRaw JSON-RPC methods, schemas, or dispatch surfacetype: performanceSlow, unbounded, or inefficient work that can stall editor/client workflows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions