Skip to main content
Glama

close_usd_stage

DestructiveIdempotent

Closes a USD stage by stage_name, releasing its memory stage and removing it from the UEAgent USD registry cache to free memory.

Instructions

Close a USD stage by its LLM-facing stage_name. Removes the stage from the LLM-facing UEAgent::UsdRegistry::GStageNameCache AND calls UnrealUSDWrapper::EraseStageFromCache on it — this is the ONLY way to release a memory stage (memory stages are never closed automatically, even on editor shutdown). If stage_name is not in the cache the call returns success with a note rather than an error (idempotent — closing an already-closed stage is a no-op). The 'removed_from_cache' field reports whether the stage was actually present in the UnrealUSDWrapper stage cache at close time.

Returns: { stage_name: string, closed: bool, was_in_cache: bool, removed_from_cache: bool, note: string? }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stage_nameYesName the stage was registered under via open_usd_stage or create_usd_stage.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already indicate destructive, idempotent, and non-read-only behavior, but the description adds significant context beyond them: it explains the two cache removals, the automatic-close exception, and the idempotent success-with-note behavior when the stage is absent. It also documents the return fields without relying on an output schema.

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 description is front-loaded with the core action and then adds dense behavioral context and return fields. It is mostly efficient, though the return-field explanation repeats information in the Returns block and the cache-class naming is verbose.

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?

Although there is no output schema, the description documents the return object inline. It covers the key operational facts an agent needs: cache removal, memory-stage release, idempotency, and the note behavior when the stage is already closed.

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 schema already defines stage_name. The description adds meaning beyond that by tying stage_name to the LLM-facing registry cache and explaining that a missing stage_name produces an idempotent no-op rather than an error.

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 description states a specific verb and resource: "Close a USD stage by its LLM-facing stage_name." It also identifies the unique behavior that distinguishes it from USD-stage siblings, namely that it is the only way to release a memory stage. An agent can identify the operation without reading 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 Guidelines4/5

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

The description gives clear usage context: use it to release a memory stage, which is never closed automatically. It does not explicitly name open_usd_stage or create_usd_stage as alternatives, nor does it describe when not to use this tool, so it falls short of full when/when-not/alternative guidance.

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

Deploy Server

Other Tools