Skip to main content
Glama

Set an asset's collision body

set_asset_collision_body

FREE and SYNCHRONOUS (no jobId — do not poll). Author the PHYSICS shape a game should build its collider from for an asset revision: a rect, a circle, or a closed polygon, in NORMALIZED coordinates (0..1 fractions of the sprite/tile cell, origin top-left; a circle radius is a fraction of WIDTH). Set tileIndex to give one tile of a tileset/staged asset its own shape — it overrides the asset-level default for that tile. Pass collisionBody: null to clear.

This is what stops a game from falling back to the sprite bounding box. The shape flows into every map and asset export made AFTER this edit — Tiled per-tile objectgroups, the Tiled map Collision layer, and the Phaser/Godot/Unity/GameMaker colliders — and it is resolved from the asset at export time, so it applies to tiles that were already placed on a map before you set it. Distinct from the FOOTPRINT, which is only the level editor's snap/tessellation shape and has no physics meaning.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetIdYesAsset id or slug.
tileIndexNoTarget one collection tile (tileset/staged/terrain). Coordinates are normalized to its padded presentation cell, not the cropped item image. Omit for the asset-level default.
iterationIdYesRevision (iteration) id to stamp.
collisionBodyYesThe shape, or null to clear it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / tileIndex / description
      Previous value: -"Target one tile (tileset/staged only). Omit for the asset-level default."New value: +"Target one collection tile (tileset/staged/terrain). Coordinates are normalized to its padded presentation cell, not the cropped item image. Omit for the asset-level default."
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses that the call is 'FREE and SYNCHRONOUS (no jobId — do not poll)', which is operationally critical given many sibling tools are async job-based. It also reveals the retroactive export-time resolution ('applies to tiles that were already placed on a map'), adding behavioral context that structured annotations cannot convey.

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 most operationally urgent fact — 'FREE and SYNCHRONOUS (no jobId — do not poll)' — is front-loaded, and every sentence carries a distinct fact about coordinates, tile overrides, export flow, or the footprint distinction. The description is long, but the density is warranted given the coordinate-system and export-pipeline complexity.

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?

For a complex 4-parameter tool with a three-variant nested shape and no output schema, the description covers the coordinate convention, tileIndex override, the shape-kind variants, and downstream export effects, so an agent has what it needs to invoke correctly. The only gap is the absence of any statement about the return value or error behavior, which is a minor omission for a synchronous mutation tool.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description adds real value: it defines the NORMALIZED coordinate space ('0..1 fractions of the sprite/tile cell, origin top-left') and the circle radius convention ('fraction of WIDTH'). It also clarifies tileIndex's override semantics and the null-to-clear behavior, enabling more correct calls than the schema alone would.

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 states a specific verb and resource — 'Author the PHYSICS shape a game should build its collider from for an asset revision' — and enumerates the exact shape kinds (rect, circle, closed polygon). It further distinguishes the collision body from the FOOTPRINT ('no physics meaning'), preventing confusion with a closely related geometry concept even though no sibling shares the same purpose.

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 gives clear context on when this tool matters ('stops a game from falling back to the sprite bounding box') and explains scoping rules for tileIndex (per-tile override vs asset-level default). It provides a conceptual exclusion against the FOOTPRINT, but never names an alternative sibling tool as an explicit when-not-to-use, which keeps it just shy of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources