Skip to main content
Glama

update_component

Update or add a component on a GameObject by specifying the component name and optional field data.

Instructions

Updates component fields on a GameObject or adds it to the GameObject if it does not contain the component

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceIdNoThe instance ID of the GameObject to update
objectPathNoThe path of the GameObject in the hierarchy to update (alternative to instanceId)
componentDataNoAn object containing the fields to update on the component (optional)
componentNameYesThe name of the component to update or add
Behavior4/5

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

Annotations already indicate mutation (readOnlyHint=false). Description adds value by explaining the add-if-missing behavior, which is a key behavioral trait not inferred from annotations. Discloses that the tool may create a component, which is important for agent understanding.

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?

Single sentence that is concise, informative, and front-loaded. No unnecessary words. Every part contributes to understanding the tool's function.

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

Completeness3/5

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

No output schema exists, and description does not hint at return value (e.g., success/error, updated component). With a nested object parameter (componentData), more guidance on expected structure would improve completeness. Overall adequate for basic use but leaves some gaps.

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 coverage is 100% with descriptions for all 4 parameters. Description does not add detailed semantics beyond schema, but effectively summarizes the overall purpose. For componentData, schema defines it as an object, but description offers no additional guidance on structure or constraints. Baseline 3 is appropriate.

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?

Description clearly states it updates component fields or adds the component if missing. Specific verb 'updates' and resource 'component on a GameObject' with clear dual behavior. Distinguishes from sibling tools like update_gameobject that handle other properties.

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?

No explicit guidance on when to use this tool versus alternatives like update_gameobject or delete_gameobject. Does not indicate scenarios where adding is preferred over updating, nor how to choose between instanceId and objectPath. Usage is implied but not clearly delineated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/joel-wehr/unity-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server