Skip to main content
Glama

set_game_mode_default_pawn

DestructiveIdempotent

Set a GameMode's DefaultPawnClass on its class default object so future spawned GameModes use the chosen APawn-derived pawn; Blueprint changes require save_asset to persist.

Instructions

Write DefaultPawnClass on the class default object (CDO) of an AGameModeBase subclass, picked by game_mode_class_path or else game_mode_class (one is required), to pawn_class, which must derive from APawn; a class that does not resolve or derive is an error. GameModes spawned later (the next PIE) use it. A Blueprint GameMode's CDO is modified and its package marked dirty but not saved: persist it with save_asset (persistable true). A native GameMode class has no savable package, so its value lasts only until the editor closes (persistable false). default_pawn_class is read back from the CDO. Read the slots with get_game_mode_info; set_game_mode_override picks the GameMode of the level.

Returns: { game_mode_class: string, default_pawn_class: string, persistable: bool }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pawn_classYesAPawn-derivative class name
game_mode_classNoOptional AGameModeBase class name (short or /Script/ path)
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.8/5.0
Behavior5/5

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

Annotations already declare the mutation profile (readOnly=false, destructive=true, idempotent=true), yet the description adds substantial context beyond them: the Blueprint CDO is dirtied but not saved, a native class has no savable package so its value lasts only until the editor closes, and the persistable flag encodes which case applies. Error behavior (unresolvable/non-APawn class) is also disclosed.

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?

Front-loads the core action and constraints, then layers persistence and sibling routing. The opening sentence is dense and slightly run-on, but essentially every clause carries load-bearing information with no filler.

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?

There is no output schema, and the description compensates by spelling out the return shape ({ game_mode_class, default_pawn_class, persistable }) and what each implies. Combined with the mutation, persistence, and error disclosures, nothing an agent needs to call this correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds real semantics: game_mode_class_path takes precedence over game_mode_class, exactly one is required, and pawn_class must derive from APawn. That precedence rule is not stated in the schema and materially affects invocation.

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 specific verb and resource: writing DefaultPawnClass on the CDO of an AGameModeBase subclass, with the selector logic (game_mode_class_path or game_mode_class, one required) and the pawn_class derivation constraint. It is clearly distinguishable from siblings like get_game_mode_info and set_game_mode_override, both of which it names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly routes the agent: 'Read the slots with get_game_mode_info; set_game_mode_override picks the GameMode of the level.' It also explains the persistence workflow (persist with save_asset when persistable is true), covering both when to use this tool and how to follow up after it.

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