How unreal_get_ue_context injects accurate UE 5.7 API documentation into the AI's context window, and when to use it.
Context System
The unreal_get_ue_context tool solves a fundamental problem with AI-assisted Unreal development: language models have training cutoffs and often hallucinate deprecated or incorrect UE APIs. The context system injects accurate, version-pinned UE 5.7 documentation directly into the AI's context window on demand.
The Problem
AI models trained before UE 5.7's release — or trained on a mix of UE versions — frequently:
- Suggest APIs that were deprecated or removed in 5.x
- Use incorrect function signatures (wrong parameter order, wrong types)
- Confuse UE4 patterns with UE5 equivalents (e.g.,
GetWorld()->SpawnActorvs Enhanced Subsystems) - Generate
UPROPERTYandUFUNCTIONspecifiers that don't exist in 5.7
These errors are subtle. The code often looks plausible and compiles after minor edits, but produces incorrect runtime behavior.
The Solution
unreal_get_ue_context is a read-only tool that fetches curated, version-pinned documentation snippets for UE 5.7. When the AI calls this tool before writing code, it receives accurate API signatures, correct specifier lists, and working code examples — grounded in the actual 5.7 release.
Categories
The tool accepts a category string that selects a documentation domain. Available categories:
| Category | Contents |
|---|---|
actor | AActor lifecycle, spawning, tags, components, tick, destroy |
animation | UAnimInstance, state machines, montages, notifies, linked layers |
assets | Asset registry, FAssetData, UObjectLibrary, async loading |
blueprint | Blueprint-callable C++ patterns, UFUNCTION specifiers, BlueprintImplementableEvent |
character | ACharacter, UCharacterMovementComponent, movement modes, jump |
enhanced_input | UInputAction, UInputMappingContext, UEnhancedInputComponent, triggers, modifiers |
material | UMaterialInstanceDynamic, parameter collections, MID in C++ |
parallel_workflows | Task graph, AsyncTask, ParallelFor, game thread marshaling |
replication | UPROPERTY replication, RPCs, OnRep, NetMulticast, authority checks |
slate | SWidget, SCompoundWidget, SLATE_ATTRIBUTE, FSlateApplication |
How to Use
Call unreal_get_ue_context at the start of any task that involves writing UE 5.7 C++. Pass the category most relevant to the work.
{
"operation": "query",
"params": {
"category": "enhanced_input"
}
}
{
"operation": "query",
"params": {
"category": "character"
}
}
The tool returns a structured documentation block that is injected into the AI's context window. The AI reads it before generating code, using the accurate 5.7 signatures rather than relying on training data.
Example Response
A partial example of what unreal_get_ue_context returns for the enhanced_input category:
UE 5.7 Enhanced Input — Key APIs
UInputAction (UIA)
Class: UInputAction : UDataAsset
Header: EnhancedInput/Public/InputAction.h
ValueType: EInputActionValueType { Boolean, Axis1D, Axis2D, Axis3D }
UInputMappingContext (IMC)
Class: UInputMappingContext : UDataAsset
Header: EnhancedInput/Public/InputMappingContext.h
AddMapping: FEnhancedActionKeyMapping& AddMapping(UInputAction*, FKey)
Binding in C++ (APlayerController subclass):
void AMyController::SetupInputComponent()
{
Super::SetupInputComponent();
UEnhancedInputComponent* EIC =
CastChecked<UEnhancedInputComponent>(InputComponent);
EIC->BindAction(IA_Jump, ETriggerEvent::Triggered,
this, &AMyController::OnJump);
// Add IMC
if (UEnhancedInputLocalPlayerSubsystem* Sub =
ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(
GetLocalPlayer()))
{
Sub->AddMappingContext(IMC_Default, 0);
}
}
UPROPERTY specifiers for input assets:
UPROPERTY(EditDefaultsOnly, Category="Input")
TObjectPtr<UInputAction> IA_Jump;
UPROPERTY(EditDefaultsOnly, Category="Input")
TObjectPtr<UInputMappingContext> IMC_Default;
When to Use It
Use unreal_get_ue_context whenever the task involves:
- Writing new C++ classes that extend UE engine classes
- Using UE subsystems (Enhanced Input, GAS, Online Subsystem, etc.)
- Adding
UPROPERTYorUFUNCTIONspecifiers you're not certain about - Implementing replication — authority checks, RPCs, OnRep functions
- Working with the animation system (montages, linked layers, notify states)
- Using Slate for custom editor UI widgets
You do not need it for:
- Pure Blueprint graph operations (use
unreal_blueprintstool calls instead) - Reading or searching existing assets
- Moving or spawning actors with known class paths
Context vs. Searching Engine Source
unreal_get_ue_context is faster and more reliable than reading engine source files directly:
| Approach | Speed | Accuracy | Token cost |
|---|---|---|---|
unreal_get_ue_context | Instant | Curated, version-pinned | Low — returns only relevant snippets |
| Reading engine source files | Slow | Exact but requires navigation | High — full header files |
| Relying on training data | Instant | Unreliable, may be outdated | Zero |
For most coding tasks, unreal_get_ue_context gives you the right answer in one call. Only reach for engine source files when you need implementation details that go beyond API signatures — for example, understanding the internal state machine of UCharacterMovementComponent.
The engine source reference path is: C:/Users/Natal/Github/UnrealEngine/Engine/Source/ (UE 5.7.3-release).