Skip to main content
Glama

unity_add_component

Add a Unity component to a GameObject by component type name; short and full names are fuzzy matched to resolve the type.

Instructions

Add a component by type name (short or full name, fuzzy matched). (Unity editor offline right now: schemas are cached; calls will fail until it reconnects)

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>",
      "component": "<component>"
    },
    "name": "unity_add_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
componentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses the editor-offline failure mode and cached-schema state, but it omits mutation-specific behavior such as permissions, duplicate-component handling, reversibility/undo, and side effects on the scene.

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 definition is two short sentences/fragments, front-loaded with the action and type-name behavior. The offline caveat is clearly parenthesized and no words are wasted.

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

Completeness2/5

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

For a mutation tool with no annotations, 0% schema descriptions, and no output schema, the definition is too thin. It leaves the required path semantics and mutation side effects undocumented; the offline status is helpful but does not compensate for these core gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain both required parameters. It adds meaning for 'component' (short/full type names, fuzzy matched) but gives no meaning for the required 'path' parameter, leaving a critical target argument ambiguous.

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?

The description names a specific verb ('Add') and resource ('component'), and explains that the component type supports short or full names with fuzzy matching. It is clear what the tool does, though it does not explicitly differentiate itself from other Unity mutation/property tools.

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?

Usage is implied by the action, and the offline note provides an explicit when-not condition: calls will fail until the editor reconnects. However, it does not point to alternatives such as using property tools on existing components or explain when to prefer this tool over related Unity tools.

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