Skip to main content
Glama

set_prim_attribute

Set one attribute of a prim, such as light intensity, camera focal length, shape size, or display color, when no other tool handles that property.

Instructions

Set one attribute of a prim, such as a light's intensity or colour, a camera's focal length, a shape's size or radius, or a display colour.

Use it for an attribute no other tool sets; set_prim_transform, set_visibility, set_material and set_physics_properties set theirs. The attribute must exist on the prim: get_prim_properties lists them, a schema's included, and a name it lacks gets its closest names. The value is converted to the attribute's type, within the type's range; a token outside its allowed ones is written, with a note naming them. A change that alters a shape's box updates its authored extent, so get_prim_bounds follows. Refused, with nothing written: a relationship, an xform op, visibility, an animated attribute, one a stronger layer holds, a size change whose extent another layer or an animation holds, a prim inside an instance or a prototype, an inactive prim. By default (layer="auto") it writes where edits go, but Kit's own cameras and a viewport light rig's lights in Kit's session layer, which save_scene doesn't keep. layer="session" writes there for a check that must leave every file as it is; no tool takes such a value back, and a later write beneath it, at the edit target, is refused until the stage is opened again or execute_script removes it from the session layer. A physics value set while the simulation plays may reach PhysX only once it stops. A DistantLight comes at an intensity of 50,000, UsdLux's sunlight; a few thousand suits a viewport capture. The answer gives the value before and after, and the layer written.

Input Schema

NameRequiredDescriptionDefault
nameYesThe attribute, as get_prim_properties names it, e.g. "inputs:intensity"
layerNoauto: where edits go, but Kit's own cameras and a light rig's lights in Kit's session layer; session: Kit's session layer, which no save writes, for a check that must leave every file as it is; edit_target: where edits goauto
valueYesIts new value in JSON: a number, true or false, a string or token, or a list for a vector, colour or array, e.g. [1, 0, 0]
prim_pathYesFull USD path of the prim, e.g. "/World/Robot"

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, destructiveHint=false and openWorldHint=false; the description adds the substance: refusals occur 'with nothing written' for relationships, xform ops, animated attributes, stronger layers, instances/prototypes and inactive prims; a session-layer write blocks later edit-target writes until the stage reopens; physics values may reach PhysX only after the sim stops. It also discloses the return payload (before/after value plus layer written), which is behavior an agent cannot infer from the hints. No contradiction with destructiveHint=false — the described failure mode is always a no-op refusal.

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

Conciseness3/5

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

The purpose and sibling exclusion are correctly front-loaded, and almost no sentence is padding — nearly every clause carries a distinct behavioral fact. However, the body is a single run-on block of colon-chained clauses ('The attribute must exist on the prim: get_prim_properties lists them, a schema's included, and ...'), which makes it hard to parse at speed and buries the high-value refusal and layer rules inside dense prose.

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 mutation tool with 4 parameters and an output schema, this covers what an agent needs: attribute discovery, type coercion, refusal conditions, layer persistence tradeoffs, simulation timing, and even a domain hint that UsdLux sunlight defaults to 50,000 intensity while a few thousand suits a viewport capture. Nothing material about correct invocation is left unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, but the description still adds real semantics: the name must exist on the prim and an unmatched name resolves to its closest names, the value is converted to the attribute's declared type and clamped to its range, and out-of-range tokens are written with a note naming the allowed ones. It also explains the non-obvious consequence that a shape size change updates the authored extent, so get_prim_bounds reflects it.

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 opens with a specific verb and resource ('Set one attribute of a prim') and immediately grounds it in concrete examples: light intensity or colour, camera focal length, shape size/radius, display colour. It explicitly differentiates from siblings by naming set_prim_transform, set_visibility, set_material and set_physics_properties as the tools that own their own attributes.

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?

It states the selection rule precisely ('Use it for an attribute no other tool sets') and points to get_prim_properties as the way to discover valid attribute names. It also gives conditional guidance for the layer choice — layer='session' only 'for a check that must leave every file as it is' — and enumerates the cases where the call is refused rather than silently misapplied.

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