Skip to main content
Glama

add_player_death_event

Adds a custom player death event to a Blueprint that pauses the game, shows the mouse cursor, and displays a lose widget when health reaches zero.

Instructions

Add a custom LostGame event to handle player death as described in Ch. 11.

Creates:

  1. Custom Event "LostGame"

  2. SetGamePaused(true)

  3. ShowMouseCursor(true)

  4. CreateWidget(LoseMenu) + AddToViewport

  5. Modify EventAnyDamage to call LostGame when health reaches 0

Args: blueprint_name: Player character Blueprint name lose_widget_name: Widget to display on player death health_variable: Variable holding player health float node_position: [X, Y] graph position for the custom event node

KB: see knowledge_base/17_GAME_SYSTEMS_COOKBOOK.md#overview Example: add_player_death_event(blueprint_name="/Game/MCP_Test/BP_Example")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_positionNo
blueprint_nameYes
health_variableNoPlayerHealth
lose_widget_nameNoWBP_LoseMenu

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With zero annotations, the description carries full disclosure burden, and it delivers the essentials: the numbered list explicitly discloses the mutations (pausing the game, showing the cursor, creating a widget, and modifying EventAnyDamage to call LostGame at zero health). It stops short of disclosing reversibility, idempotency of repeated calls, or prerequisites like the blueprint already containing EventAnyDamage.

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 description is exceptionally well structured: a purpose line, a front-loaded numbered list of side effects, an Args block, a KB pointer, and an example call. Every section earns its place and the format mirrors how an agent needs to consume it.

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?

For a graph-mutating composite tool, the description covers the 'what' thoroughly but omits the 'what if' scenarios: behavior when the blueprint lacks EventAnyDamage, what happens if health_variable doesn't exist, and whether repeated invocation duplicates nodes. The KB link and output schema mitigate this, but an agent operating on a live project would want the preconditions stated explicitly.

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 Args section carries full weight—and it documents all four parameters (blueprint_name, lose_widget_name, health_variable, node_position) with their roles. Minor gaps: it doesn't state that only blueprint_name is required, and node_position's [X, Y] format is described tersely.

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+resource ('Add a custom LostGame event to handle player death') and then enumerates the five concrete operations it performs, from creating the custom event to rewiring EventAnyDamage. This clearly distinguishes it from granular siblings like add_custom_event or add_apply_damage_node, which only perform single operations.

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 context is implied through 'as described in Ch. 11' and the KB link (knowledge_base/17_GAME_SYSTEMS_COOKBOOK.md#overview), which signals this is a recipe-driven composite operation. However, it never names alternatives (e.g., create_lose_screen_widget or add_custom_event) or states when NOT to use this tool, leaving the selection reasoning to the agent.

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