Skip to main content
Glama

physics_manage

Run 2D/3D raycasts, point queries, and create sensors or shapecasts to detect collisions in Godot physics spaces.

Instructions

Physics Queries, Raycasting, and Sensor Scaffolding.

Ops:

  • raycast_2d(from_pos=[0, 0], to_pos=[0, 100], collision_mask=4294967295, collide_with_bodies=True, collide_with_areas=False, hit_from_inside=False) Perform a 2D raycast query directly through the active World2D physics space, returning collision point, normal, collider path, and shape.

  • raycast_3d(from_pos=[0, 10, 0], to_pos=[0, -10, 0], collision_mask=4294967295, collide_with_bodies=True, collide_with_areas=False, hit_from_inside=False) Perform a 3D raycast query directly through the active World3D physics space, returning collision point, normal, collider path, and shape.

  • query_point_2d(point=[0, 0], collision_mask=4294967295, max_results=32, collide_with_bodies=True, collide_with_areas=False) Query intersecting physics bodies and areas overlapping a 2D world coordinate.

  • scaffold_sensor(parent_path="", target_position=[0, 50], is_2d=True, sensor_name="GroundSensor", collision_mask=1, enabled=True) Instantiate and attach a RayCast2D or RayCast3D sensor to a character or node.

  • query_point_3d(point=[0, 0, 0], collision_mask=4294967295, max_results=32, collide_with_bodies=True, collide_with_areas=False) Query intersecting physics bodies and areas overlapping a 3D world coordinate.

  • shapecast_scaffold(parent_path="", shape_type="sphere", radius=1.0, is_2d=False, sensor_name="ShapeCast", collision_mask=1) Create a ShapeCast2D or ShapeCast3D node with the specified collision shape.

  • set_layer_names(layer_type="2d_physics", layers={"1": "Environment", "2": "Player"}) Set project-wide layer names (layer_type: 2d_physics | 3d_physics | 2d_render | 3d_render).

  • get_layer_names(layer_type="all") Get configured layer names (layer_type: 2d_physics | 3d_physics | 2d_render | 3d_render | all).

Canonical call shape: {"op": "<verb>", "params": {...}}. Flat op parameters are accepted as a compatibility alias when the client transmits them; op and session_id remain top-level.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYes
paramsNo
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.0.28

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the actions of each operation, including return types (e.g., 'returning collision point, normal, collider path, and shape') and side effects ('Instantiate and attach a RayCast2D or RayCast3D sensor'). However, it does not mention potential pitfalls such as prerequisites (e.g., physics space must be active), error conditions, or the reversibility of layer name changes. It is moderately transparent but incomplete.

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 as a bullet-style list of operations, with each op showing default parameters and a one-line explanation. It also includes the canonical call shape, which is essential. The length is justified by the multi-operation nature, and it is front-loaded with the overall purpose. Minor waste: the backticks around params and session_id add little.

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

Completeness4/5

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

The description covers all the relevant operations and provides the call format. It does not elaborate on return structures for all ops (e.g., query_point_2d) but the output schema exists, so that burden is reduced. For a tool that bundles 8 operations, the description is sufficiently complete to get started, though more details about error handling and edge cases would help.

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?

The schema has 0% description coverage, so the description must compensate. It includes default values for parameters and brief contextual explanations per operation, but it does not define each parameter's meaning (e.g., 'collision_mask', 'hit_from_inside', 'max_results'). The operation summaries give some context (e.g., what is returned), but not enough for an agent to adjust parameters confidently without extra knowledge. It adds value but under-explains.

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 enumerates multiple specific physics operations (raycast, point query, sensor scaffold, layer names), each with a clear verb and resource. It distinguishes this tool as the physics query and scaffolding manager. While there is a sibling 'physics_query_manage', the description's explicit operation list makes 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 Guidelines3/5

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

The description gives a clear sense of what each operation does, but it does not explicitly discuss when to prefer this tool over alternatives like physics_query_manage, nor does it provide any exclusions or conditions. The usage context is implied by the operations but not contrasted with siblings, leaving the agent to infer the boundary.

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

Deploy Server

Other Tools