Skip to main content
Glama

Set Component Property

unity_set_component_property
Idempotent

Set a serialized property or field on a Unity component by specifying GameObject path, component type, property name, and JSON value. Retry with the allowed-type hint if the property is not settable.

Instructions

Set one serialized property/field on a component. Value is parsed as JSON.

Examples:

  • {"path":"Player","component_type":"Rigidbody","property":"mass","value_json":"5.0"}

  • {"path":"Sun","component_type":"Light","property":"intensity","value_json":"2.5"} Fails with allowed-type hint if the property is not settable — read the error and retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesHierarchy path of the GameObject, e.g. 'Player' or 'Level/Enemies/Orc'
propertyYesProperty/field name, e.g. 'mass', 'isKinematic', 'intensity'
value_jsonYesNew value as JSON, e.g. '5.0', 'true', '"hello"', '[0,1,0]'
component_typeYesComponent type name, e.g. 'Transform' or 'Rigidbody'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish readOnly=false, idempotent=true, destructive=false, so the safety profile is covered. The description adds real behavioral value beyond that: it discloses that values are parsed as JSON and that a non-settable property fails with an allowed-type hint that should be read and retried. Remaining gaps are minor (no return-value or edit-vs-play-mode scope notes).

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?

Purpose is front-loaded in the first sentence, followed by examples and a single actionable error note — each element earns its place. The example payloads overlap with the schema's own examples, which is mild redundancy but still useful for showing the fields in combination.

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 4-required-param mutation tool with no output schema, the description covers the operation, value encoding, and the failure/recovery path, while annotations carry the safety profile. It stops short of stating what is returned or whether the change takes effect in play mode, but nothing critical to invoking it correctly is missing.

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 every parameter is already documented with examples in the schema. The description's example payloads restate the same field semantics rather than adding new constraints, which is the expected baseline when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: 'Set one serialized property/field on a component,' with concrete examples for Rigidbody.mass and Light.intensity. The operation is unambiguous, but it never differentiates itself from siblings that also mutate component state (notably unity_set_transform), so an agent can't tell whether Transforms should go through here or the dedicated tool.

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 examples imply the usage pattern (single property writes on a component) and the closing sentence gives an error-recovery hint, but there is no explicit when-to-use statement and no named alternative for the same job. Usage 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.