Get Component
get_componentRetrieve component properties from a Unity GameObject by scene path and type. Use the fields parameter to request only specific values, saving tokens.
Instructions
Component properties as key-value. For MULTIPLE objects, use inspect(paths='a,b,c') instead — 1 call vs N. fields: comma-separated field names to keep (e.g. 'mass,position') — projects the result to save tokens; shows requested fields even at default values. Aliases: position, rotation, scale, mass, enabled, active, name. full=True: bypass distillation, return raw response. compress=True: strip default values before transfer.
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>"
},
"name": "get_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | Return raw uncompressed response (bypass distillation) | |
| path | Yes | Scene path to the GameObject (e.g. /Player or /World/Enemy) | |
| type | Yes | Component type name (e.g. 'Transform', 'Rigidbody', 'MeshRenderer') | |
| fields | No | Comma-separated fields to return (e.g. 'mass,localPosition') — skips all others, saves tokens | |
| compress | No | Strip fields at their default value before TCP transfer — reduces response size |