Skip to main content
Glama

add_xr_interactor

Add XR interaction components to a GameObject for selection and manipulation using ray casting or direct touch. Supports different interactor types and hand associations.

Instructions

Adds XR interaction components to a GameObject. Interactors enable selection and manipulation of XR Interactables via ray casting or direct touch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handNoWhich hand this interactor is associated withNone
lineTypeNoRay visual line typeStraight
rayWidthNoRay visual width in meters
rayLengthNoRay interactor max length in meters
enableHapticsNoEnable haptic feedback
rayValidColorNoRay color when hovering valid target (hex)#00FF00
interactorTypeYesType of interactor to add
attachTransformNoCreate attach point transform for grabbed objects
rayInvalidColorNoRay color when hovering invalid target (hex)#FF0000
targetGameObjectYesInstance ID, name, or path of the GameObject to add interactor to
selectActionTriggerNoHow select action triggersStateChange
Behavior3/5

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

Annotations indicate a write operation (readOnlyHint=false), and the description's verb 'Adds' aligns with that. The description adds behavioral context about the interactors' capabilities (ray casting/direct touch) but does not disclose side effects like potential game object modifications or dependencies on XR setup.

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?

The description is extremely concise at two sentences, with the action front-loaded in the first sentence and purpose added in the second. No filler or redundant information.

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?

Given the tool's complexity (11 params, 4 enum types) and the lack of an output schema, the description provides basic high-level context but lacks details on expected behavior, constraints, or how it fits with sibling tools. It is adequate but not complete.

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?

All 11 parameters have descriptions in the schema (100% coverage), so the description adds no extra parameter-level context. The baseline is 3, and the description does not enhance understanding of parameter usage beyond what the schema already provides.

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 clearly states the action ('Adds XR interaction components to a GameObject') and differentiates from sibling tools like 'setup_xr_interaction' by specifying component-level addition rather than system setup. It also provides context on what interactors enable (selection/manipulation), making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide any guidance on when to use this tool versus alternatives, nor does it specify prerequisites or exclusions. The mention of 'via ray casting or direct touch' gives limited context but no comparative decision framework.

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