Skip to main content
Glama

update_material_paths

Destructive

Rewrites material bindings and asset paths under a subtree from an old prefix to a new one after materials or textures move, keeping USD references pointed at their new location.

Instructions

Rewrite every path under a subtree that starts with old_prefix to start with new_prefix instead: relationship targets, such as material bindings, and asset paths, such as texture files.

Use it after materials or textures move, so bindings and textures point at their new place. The match is a plain text prefix, on any relationship or asset path: a joint's bodies or a shader's source file change too if they match, so end the prefix with "/" and keep it specific. Nothing checks that the new paths exist. Kit's undo doesn't record the change, and a failure part way keeps the edits made before it. The answer counts the paths changed and names the prims.

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": {
      "old_prefix": "<old_prefix>",
      "new_prefix": "<new_prefix>"
    },
    "name": "update_material_paths"
  }
}

Input Schema

NameRequiredDescriptionDefault
prim_pathNoThe subtree to update; the whole stage by default/
new_prefixYesWhat to put in its place, e.g. "/World/Materials/"
old_prefixYesThe start of the paths to change, matched as text, e.g. "/OldProject/Materials/"

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.3
    • changedInput schema / properties / new_prefix / description
      Previous value: -"What to put in its place, e.g. \"/World/Materials\""New value: +"What to put in its place, e.g. \"/World/Materials/\""
    • changedInput schema / properties / old_prefix / description
      Previous value: -"The path prefix to find, e.g. \"/OldProject/Materials\""New value: +"The start of the paths to change, matched as text, e.g. \"/OldProject/Materials/\""
  2. First observedv0.2.2

TDQS

A4.7/5.0
Behavior5/5

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

Annotations flag destructive=true and openWorld=false, but the description adds what they can't: nothing verifies the new paths exist, Kit's undo doesn't record the change, and a mid-way failure keeps the edits already made. Those are exactly the risk disclosures an agent needs before running a destructive rewrite.

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?

Front-loaded with the core operation in the first sentence, then when-to-use, then risk notes, then the return shape. The parenthetical examples are compact, and no sentence 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?

Output schema exists, yet the description still briefly says the answer counts changed paths and names the prims. Combined with the partial-failure and undo disclosures, an agent has everything needed to call this safely. The destructive rewriter has no remaining informational gap for its complexity.

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 baseline is 3, but the description adds real semantics beyond the schema: the match is a plain text prefix applied to any relationship or asset path, and prefixes should end with "/" to avoid over-matching. That meaningfully improves how an agent forms old_prefix.

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 and resource: rewrite every path under a subtree that starts with old_prefix to new_prefix. It further enumerates what gets rewritten (relationship targets like material bindings, asset paths like texture files), which lets an agent distinguish this from sibling mutators such as set_material or create_prim.

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?

Explicitly says when to use it: after materials or textures move, so bindings and textures point at their new place. It also gives a concrete usage caveat (end the prefix with "/" and keep it specific) because a plain-text match can hit unrelated paths. It doesn't name an alternative tool, so it stops short of 5.

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