Skip to main content
Glama

export_prim_as_file

Destructive

Export a prim's subtree to a standalone USD file, flattened with externally bound materials so the asset opens without the original scene and can be shared with another tool or project.

Instructions

Write one prim's subtree to a USD file of its own, flattened, with the materials it is bound to from outside the subtree, so the file opens without the scene.

The prim becomes / and the file's default prim, with the stage's up axis and units. Use it to hand one asset to another tool or project; flatten_usd writes the whole stage, save_scene the root layer as it is. output_path is overwritten, but one the open stage has loaded (its own file, a sublayer, a referenced or payload file) is an error, since writing it would replace a file the open scene is made of: name another path. An error too when the prim doesn't exist. Textures and other files the subtree points at are not copied.

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>",
      "output_path": "<output_path>"
    },
    "name": "export_prim_as_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
prim_pathYesThe root of the subtree to export
output_pathYesThe file to write on Kit's machine: .usd, .usda or .usdc, which a path without one gets; never one the open stage has loaded

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.3
    • changedInput schema / properties / output_path / description
      Previous value: -"The file to write: .usd, .usda or .usdc (the default)"New value: +"The file to write on Kit's machine: .usd, .usda or .usdc, which a path without one gets; never one the open stage has loaded"
  2. First observedv0.2.2

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag this as a destructive, non-read-only write, but the description adds far more: the output file is overwritten, flattening is applied, outside material bindings are pulled in, textures are NOT copied, and writing over a loaded file is an error. These are non-obvious side effects and failure modes not captured anywhere in the structured fields.

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?

Content is front-loaded — purpose first, then usage, then error conditions — and every sentence carries information. The heavy colon-separated sentences in the back half make it denser than it needs to be, but nothing is filler.

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 export with an output schema present, the description covers the transformation performed, the naming convention, side effects (materials in, textures not), and both error conditions. Nothing an agent needs before calling correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds genuine semantics: the prim becomes /<its name> and the file's default prim, inherits the stage's up axis and units, a missing extension defaults to .usd/.usda/.usdc, and output_path must not be a loaded file. Only prim_path gets no extra treatment 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?

The opening sentence gives a specific verb (write), resource (one prim's subtree), and precise scope (flattened, plus externally-bound materials, so the file opens standalone). It also names the two siblings that do something similar but different — flatten_usd and save_scene — so the agent can tell them apart immediately.

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: 'Use it to hand one asset to another tool or project; flatten_usd writes the whole stage, save_scene the root layer as it is.' It also states when the call fails (output_path already loaded by the open stage, prim doesn't exist) and what to do instead ('name another path'), which is exactly the when-not guidance an agent needs.

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