Manage Component
manage_componentAdd or remove a component on a Unity GameObject by specifying the scene path, component type, and action ('add' or 'remove').
Instructions
Add or remove a component. Mutates scene. No confirmation required. action: 'add' or 'remove' ONLY (no 'enable'/'disable' — use set_property with prop='m_Enabled' for that). type: short name (e.g. 'Button') or full namespace (e.g. 'UnityEngine.UI.Button').
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": {
"path": "<path>",
"type": "<type>",
"action": "<action>"
},
"name": "manage_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Scene path to the GameObject | |
| type | Yes | Component type (short: 'Button' or full namespace: 'UnityEngine.UI.Button') | |
| action | Yes | 'add' or 'remove' — not 'enable'/'disable' (use set_property m_Enabled for that) |