Skip to main content
Glama

physics2d

Manage Unity 2D physics: configure rigidbodies, colliders, joints, effectors, perform raycasts and overlap queries, adjust global settings.

Instructions

Manage Unity 2D Physics: rigidbodies, colliders, raycasts, joints, effectors. Actions:

  • get_settings: Get Physics2D global settings (gravity, iterations, etc.)

  • set_settings: Modify Physics2D settings

  • raycast: Cast a 2D ray and return hit info

  • overlap_circle: Find all colliders within a circle

  • overlap_box: Find all colliders within a box

  • get_rigidbodies: List all Rigidbody2D components in scene

  • set_rigidbody: Add/configure Rigidbody2D on a GameObject

  • add_force: Apply force to a Rigidbody2D

  • get_colliders: List all Collider2D components in scene

  • add_collider: Add a 2D collider to a GameObject

  • get_joints: List all Joint2D components in scene

  • get_effectors: List all Effector2D components in scene

  • get_layers: Get 2D collision layer matrix

  • set_layer_collision: Enable/disable collision between two layers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoCenter X
yNoCenter Y
dirXNoRay direction X
dirYNoRay direction Y
massNoRigidbody mass
angleNoBox rotation angle
sizeXNoBox half-width
sizeYNoBox half-height
actionYesPhysics2D action to perform
forceXNoForce X component
forceYNoForce Y component
ignoreNoIgnore collision between layers (true/false)
layer1NoFirst layer name or index
layer2NoSecond layer name or index
radiusNoCircle radius
originXNoRay origin X
originYNoRay origin Y
bodyTypeNodynamic, kinematic, or static
distanceNoMax ray distance
gravityXNoGravity X component
gravityYNoGravity Y component
objectIdNoInstance ID of a GameObject
forceModeNoForce or Impulse
isTriggerNoWhether collider is a trigger (true/false)
simulatedNoWhether rigidbody is simulated (true/false)
objectPathNoHierarchy path of a GameObject
colliderTypeNobox, circle, capsule, polygon, or edge
gravityScaleNoGravity scale
linearDampingNoLinear damping
angularDampingNoAngular damping
positionIterationsNoPosition solver iterations
queriesHitTriggersNoWhether queries hit triggers (true/false)
velocityIterationsNoVelocity solver iterations
defaultContactOffsetNoDefault contact offset
queriesStartInCollidersNoWhether queries start in colliders (true/false)
Behavior2/5

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

The description lists actions but does not disclose behavioral traits beyond what the annotations already provide. Annotations indicate readOnlyHint=false, consistent with write actions. However, the description lacks details on side effects (e.g., permanent changes to physics settings), authorization needs, or limitations (e.g., physics engine must be enabled). With only a list of action names and one-line summaries, transparency is low.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a brief intro followed by a bullet list of actions. It front-loads the core purpose. While the list is long, it is necessary given the tool's complexity. Every sentence adds value; no redundancy. Slightly verbose but efficient for the scope.

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?

The description covers all actions but lacks context on how to sequence them, prerequisites (e.g., existing GameObjects for adding components), or return values. Without an output schema, the description does not explain what each action returns. For a complex tool with 35 parameters, more guidance on typical usage patterns would improve completeness.

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 description coverage is 100%, so every parameter has a basic description. The tool description adds no additional parameter-level detail beyond listing action options. Baseline of 3 is appropriate because the schema already provides the necessary semantics, and the description does not enhance understanding of parameters.

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 starts with 'Manage Unity 2D Physics: rigidbodies, colliders, raycasts, joints, effectors.' clearly stating the tool's purpose and domain. It distinguishes from the sibling tool 'physics' by explicitly mentioning 2D, which is the key differentiator. The list of actions further specifies what can be done, leaving no ambiguity about the tool's scope.

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

Usage Guidelines4/5

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

The description implicitly guides usage by labeling the tool as '2D Physics,' which tells an agent to use this for 2D physics tasks and likely the sibling 'physics' for 3D. However, it does not explicitly state when not to use this tool or provide direct comparisons with alternatives. The list of actions itself gives context for which action to pick based on the task.

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