Skip to main content
Glama

apply_usd_prim_schema

Destructive

Apply a USD API schema to an existing prim on a registered USD stage's current edit target. Checks compatibility first and returns applied status with a reason if it fails.

Instructions

Apply a USD API schema (e.g. "MaterialBindingAPI") to an existing prim of a registered USD stage, on the current edit target. Checks CanApplyAPI first: a schema that cannot apply returns applied=false with the USD reason in why_not instead of an error. Not saved to disk.

Returns: { applied: bool, schema_name: string, why_not?: string }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prim_pathYesAbsolute SdfPath of an existing prim, e.g. "/World/Cube".
stage_nameNoName the stage was registered under by create_usd_stage or open_usd_stage; a stage already in the USD cache also matches by the end of its root layer identifier.
schema_nameYesSchema identifier (not the C++ class name), e.g. "MaterialBindingAPI", "GeomModelAPI"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.2.0
    • changedInput schema / properties / prim_path / description
      Previous value: -"Target prim path"New value: +"Absolute SdfPath of an existing prim, e.g. \"/World/Cube\"."
    • changedInput schema / properties / schema_name / description
      Previous value: -"Schema identifier, e.g. \"MaterialBindingAPI\", \"UsdGeomModelAPI\""New value: +"Schema identifier (not the C++ class name), e.g. \"MaterialBindingAPI\", \"GeomModelAPI\""
    • changedInput schema / properties / stage_name / description
      Previous value: -"Stage cache key"New value: +"Name the stage was registered under by create_usd_stage or open_usd_stage; a stage already in the USD cache also matches by the end of its root layer identifier."
  2. First observedv1.1.0

TDQS

A4/5.0
Behavior4/5

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

Adds real value beyond the annotations: it discloses that CanApplyAPI is checked first, that a non-applicable schema returns applied=false with the reason in why_not instead of throwing, and that changes are not persisted to disk. The destructiveHint=true annotation is not contradicted, though the description doesn't explicitly reconcile 'destructive' with the non-persisted nature of the write.

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

Conciseness5/5

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

Two tight paragraphs: the action and scope first, then the failure mode and persistence caveat, then the return shape. No filler and nothing buried.

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

Completeness4/5

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

For a 3-param mutation with full schema coverage and no output schema, the description supplies the return shape, failure semantics and persistence behavior. Minor gap: it never clarifies which stage is used when the optional stage_name is omitted, though it references 'a registered USD stage'.

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?

Schema description coverage is 100%, so the schema already documents prim_path, stage_name and schema_name including examples. The description restates the prim/schema concepts but adds no syntax or defaulting detail beyond the schema, so baseline 3 applies.

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 (Apply) and resource (USD API schema) plus the exact target (an existing prim of a registered USD stage, on the current edit target), with a concrete example schema. It is plainly distinct from siblings like remove_usd_prim_schema or define_usd_prim.

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

Usage Guidelines3/5

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

The context implies usage (existing prim, registered stage, current edit target), but there is no explicit when-to-use/when-not or named alternative such as set_usd_prim_type or remove_usd_prim_schema. Guidance is inferable rather than stated.

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