Skip to main content
Glama

setup_hit_material_swap

Set up hit-triggered material swap and destruction for a Blueprint actor: first hit changes its material, additional hits spawn an explosion and destroy the actor.

Instructions

Set up a full hit-detection + material swap interaction as in Ch. 5.

Creates the complete "cylinder target" interaction:

  1. Event Hit -> track hit count

  2. First hit: swap to hit material

  3. Second+ hit: spawn explosion effect + sound + destroy actor

Args: blueprint_name: Blueprint to modify (e.g., "BP_CylinderTarget") mesh_component: Static mesh component name default_material_path: Original material path hit_material_path: Material to apply on first hit (e.g., M_TargetRed) hit_count_to_destroy: Number of hits before destruction (default 2)

KB: see knowledge_base/08_MATERIALS_AND_RENDERING.md#overview Example: setup_hit_material_swap(blueprint_name="/Game/MCP_Test/BP_Example")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blueprint_nameYes
mesh_componentNoStaticMeshComponent
hit_material_pathNo
hit_count_to_destroyNo
default_material_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations provided, the description must disclose behavioral traits itself. It does describe the runtime behavior it sets up (hit detection, material swap, explosion, sound, destroy). It also mentions that it modifies a blueprint via the argument 'blueprint_name: Blueprint to modify'. However, it does not disclose side effects such as whether it overwrites existing event logic, requires pre-existing components, or persists changes. The description is informative but incomplete regarding the tool's own mutation behavior.

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: it starts with the purpose, then a numbered list of the interaction steps, followed by an Args list, a knowledge-base pointer, and an example. Each section earns its place and is front-loaded with the core idea. It is a bit lengthy but justified given the complexity of the tool.

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 the tool's purpose, steps, parameters, an example, and a knowledge-base reference. It provides enough to invoke the tool correctly for a standard scenario, including defaults. It does not discuss edge cases (e.g., what happens if hit_count_to_destroy is 1 or if material paths are left empty), and the reference to 'Ch. 5' may rely on external knowledge, but overall it is fairly complete for the given complexity.

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 0%, so the description must compensate. It does so effectively with an Args section that explains each parameter and provides an example value for blueprint_name, a default for hit_count_to_destroy, and examples for material paths. This adds meaning beyond the bare schema, though it could be slightly more detailed about path formats and defaults for empty strings, but it is largely sufficient.

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 tool's purpose: 'Set up a full hit-detection + material swap interaction as in Ch. 5.' It names the specific resource (blueprint) and the action (setup), and enumerates the exact behavior in three numbered steps. This distinguishes it from sibling tools that handle individual steps (e.g., add_hit_event, set_material_on_actor) by describing a composite workflow.

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 concrete scenario ('cylinder target interaction') and an example call, implying when it should be used. However, it does not explicitly state when to prefer this over manual composition of sibling tools (add_hit_event, set_material_on_actor, etc.), nor does it mention any prerequisites or exclusions. The guidance is implicit rather than explicit.

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