Skip to main content
Glama

set_game_mode_spectator_class

DestructiveIdempotent

Set the SpectatorClass property on a GameMode's CDO to define which pawn spectators use. Persist Blueprint GameMode changes with save_asset.

Instructions

Set the AGameModeBase::SpectatorClass UPROPERTY on the GameMode's CDO. A Blueprint GameMode's package is marked dirty but not saved (persist it with save_asset); a native class's value lasts only until the editor closes (persistable false). spectator_class is read back from the CDO.

Returns: { game_mode_class: string, spectator_class: string, already_set: bool, persistable: bool }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
game_mode_classNoOptional AGameModeBase class name (short or /Script/ path)
spectator_classYesASpectatorPawn-derivative class name (NoClear: empty/None rejected)
game_mode_class_pathNoOptional long /Script/Engine.GameModeBase path (takes precedence)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Despite annotations (readOnlyHint=false, destructiveHint=true, idempotentHint=true), the description adds substantial context annotations do not carry: a Blueprint GameMode's package is marked dirty but NOT saved, native class values are non-persistable and vanish on editor close, and the value is read back from the CDO. This is exactly the behavioral detail needed to set expectations around persistence and idempotency.

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?

Two tightly-packed sentences lead with the target property, then the persistence caveat, followed by the return shape. No filler; the dense phrasing each sentence contributes a distinct, load-bearing fact.

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

Completeness5/5

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

For a mutation tool with no formal output schema, the description supplies the return object fields (game_mode_class, spectator_class, already_set, persistable), so the agent knows both the persistence semantics and the response shape. Nothing material for correct invocation is missing.

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% and the schema already documents all three parameters (including the empty/None rejection for spectator_class and precedence for game_mode_class_path). The description adds only that spectator_class is read back from the CDO, so the baseline 3 is appropriate.

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?

States a precise verb+resource: 'Set the AGameModeBase::SpectatorClass UPROPERTY on the GameMode's CDO.' This unambiguously distinguishes it from the sibling setters (set_game_mode_default_pawn, set_game_mode_game_state_class, set_game_mode_hud_class, set_game_mode_player_state_class), which all target different GameMode CDO properties.

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 is implied rather than stated — it tells you how to persist a Blueprint GameMode's change via save_asset and notes native-class edits are lost on editor close, which helps the agent decide, but there is no explicit 'use this vs. X' framing or prerequisite/permission guidance. The save_asset hint is useful, but selection criteria against alternatives are left to inference.

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