Audit¶
13 tools for health audits of asset references, Blueprints, collision profiles, replication and widgets, and a capture of the PIE state.
Back to the index.
audit_asset_naming¶
Read-only
Sweep the assets under folder_path for naming-convention problems: a name without the prefix its class takes (BP_, BPI_, WBP_, ABP_, M_, MI_, MF_, T_, SM_, SK_, SKEL_, AS_, AM_, NS_, S_, SC_, DT_, IA_, IMC_... after Epic's recommended conventions), spaces, and characters other than letters, digits and underscore. Asset Registry only: nothing is loaded. Classes with no prefix rule (levels, data assets of project classes...) are counted in unchecked_count, not reported. Each finding carries a suggested_name. Returns findings inline, paged with offset/limit; the summary counts every finding. Read-only: it renames nothing (rename_asset does).
| Parameter | Type | Required | Description |
|---|---|---|---|
folder_path |
string | no | Content folder to scan. Defaults to "/Game". |
recursive |
boolean | no | Recurse into subfolders. Defaults to true. |
prefixes |
object | no | Prefix rules by class short name, merged over the defaults: {"StaticMesh": "SM_", "Texture2D": ["T_", "TX_"], "World": "L_", "Blueprint": ""}. A string or an array of accepted prefixes (case-sensitive); "" or [] turns the class's rule off. Blueprints are keyed Blueprint, BlueprintInterface, BlueprintFunctionLibrary and BlueprintMacroLibrary. |
replace_default_prefixes |
boolean | no | Use only the prefixes param, without the defaults. Defaults to false. |
rules |
array | no | Rule ids to run, default all: naming_prefix, naming_space, naming_invalid_char. An unknown id is an error. |
max_results |
number | no | Cap on assets examined (1-100000). Defaults to 50000. |
offset |
number | no | Index of the first finding returned. Defaults to 0. |
limit |
number | no | Findings returned per call (1-5000). Defaults to 200. |
Returns: { folder_path, scanned: int, scan_truncated: bool, unchecked_count: int, prefix_rules: {class: [string]}, rules: [string], summary: { finding_count, by_severity: {error, warning, info}, by_rule: {rule: int} }, findings: [{ severity, rule, asset, asset_class, message, suggested_fix, suggested_name, expected_prefixes? }], offset, limit, returned, next_offset: int|null }
audit_asset_references¶
Destructive
Sweeps the assets under folder_path for two reference problems: orphans (assets no package references, by Asset Registry metadata) and broken references (a dependency on a package that is no longer on disk; /Script/ C++ modules are skipped). Metadata-only: it never loads, changes or saves an asset, so it scales to large projects. Not read-only, though: the full lists go to a new JSON report under <Project>/Saved/MCPAudits/ (a call within the same second replaces the previous one), and the reply carries only the counts and the report path; read the lists with get_mcp_audit_report. Orphans are candidates, not proof: levels and assets loaded by name or from config have no referencers either. For one asset use get_asset_referencers or get_asset_dependencies; for unused assets only, find_unused_assets; delete with delete_asset and clean redirectors with fixup_redirectors.
| Parameter | Type | Required | Description |
|---|---|---|---|
folder_path |
string | no | Content folder to scan, e.g. "/Game/Props" or a plugin mount such as "/MyPlugin". Defaults to "/Game". |
recursive |
boolean | no | Recurse into subfolders. Defaults to true. |
max_results |
number | no | Cap on assets processed, clamped to 1-100000; defaults to 5000. The summary has no truncation flag: asset_count equal to the cap means the sweep was cut. |
dependency_type |
string | no | "hard"|"soft"|"all" (case-insensitive), default "all"; any other value is treated as "all". Scopes BOTH the referencer check (orphan detection) and the dependency check (broken-reference detection) to that dependency kind. Use "hard" to find only the broken references that actually break loading -- a broken SOFT reference (TSoftObjectPtr/FSoftObjectPath) does not. "all" applies no Hard/Soft requirement at all. |
Returns: { path: string, summary: { asset_count: int, orphan_count: int, broken_reference_count: int, dependency_type: string } }
audit_blueprint_health¶
Destructive Refused during PIE
Project-wide compile-sweep: RECOMPILES every Blueprint under folder_path and records error/warning counts. By far the heaviest audit here (it compiles, it does not just read metadata) and it runs synchronously in the editor -- ALWAYS scope it with folder_path on a large project, and lean on max_results, which is a hard cap. It returns only a summary plus a report path; read the detail back with get_mcp_audit_report. To find already-broken Blueprints WITHOUT recompiling anything, use find_erroring_blueprints instead.
| Parameter | Type | Required | Description |
|---|---|---|---|
folder_path |
string | no | Content-relative folder to scan. Defaults to "/Game". |
recursive |
boolean | no | Recurse into subfolders. Defaults to true. |
max_results |
number | no | Cap on Blueprints compiled (1-100000). Defaults to 200 (lighter than the other audits -- compiling is expensive). |
Returns: { path: string, summary: { blueprint_count: int, clean_count: int, error_count: int, warning_count: int } }
audit_collision_profiles¶
Destructive
Aggregate report of every project collision profile AND every collision channel (built-in + custom), including which custom ECC_GameTraceChannelN slots are already taken -- the question to ask before add_collision_channel. Cheap: it reads the collision settings in memory, with no AssetRegistry scan and no asset loading, so unlike the other audit_* sweeps it takes no folder_path and no max_results. Returns a summary + a report path (read the detail with get_mcp_audit_report).
No parameters.
Returns: { path: string, summary: { profile_count: int, channel_count: int, custom_channels_in_use: int } }
audit_level_actors¶
Read-only
Sweep the actors of a world for placement problems: actors with no components, bare AActor instances with nothing visible, duplicates stacked at the same transform with the same meshes, mesh components with no mesh or with empty material slots, actors far from the origin or below the world's KillZ, and meshes hidden in game that still collide. Defaults to the editor world; pass world to audit a PIE world. In a World Partition map only the loaded actors are seen. Returns findings inline, paged with offset/limit; the summary counts every finding. Read-only.
| Parameter | Type | Required | Description |
|---|---|---|---|
world |
string | no | Optional world selector: absent/'editor' (default) | 'pie' (ambiguous: PlayWorld, else the first PIE context) | 'server' (the PIE world with authority) | 'client' | 'pie:N' | 'game' (alias of 'pie'). |
max_distance |
number | no | Distance from the origin, in cm, beyond which an actor is reported. Defaults to 1048576 (the classic half world size, about 10.5 km). |
rules |
array | no | Rule ids to run, default all: actor_no_components, actor_no_visual, actor_duplicate, actor_missing_mesh, actor_missing_material, actor_out_of_bounds, actor_below_kill_z, actor_hidden_collidable. An unknown id is an error. |
max_results |
number | no | Cap on actors examined (1-100000). Defaults to 50000. |
offset |
number | no | Index of the first finding returned. Defaults to 0. |
limit |
number | no | Findings returned per call (1-5000). Defaults to 200. |
Returns: { world: string, world_name, world_package, world_type, net_mode, pie_instance, scanned: int, scan_truncated: bool, rules: [string], summary: { finding_count, by_severity: {error, warning, info}, by_rule: {rule: int} }, findings: [{ severity, rule, actor, actor_name, actor_class, message, suggested_fix, component?, location?, duplicate_of? }], offset, limit, returned, next_offset: int|null }
audit_replication¶
Destructive
Project-wide replication audit: for every Blueprint under folder_path, which variables are Replicated (CPF_Net), whether the class itself replicates (AActor::GetIsReplicated on the GeneratedClass CDO), and which UFUNCTIONs are RPCs (FUNC_NetFuncFlags). It returns only a SUMMARY plus a report path -- the full per-Blueprint detail is written to Saved/MCPAudits/ and must be read back with get_mcp_audit_report. For one actor rather than a sweep, use get_actor_replication_info.
| Parameter | Type | Required | Description |
|---|---|---|---|
folder_path |
string | no | Content-relative folder to scan. Defaults to "/Game". |
recursive |
boolean | no | Recurse into subfolders. Defaults to true. |
max_results |
number | no | Cap on Blueprints processed (1-100000). Defaults to 1000. |
Returns: { path: string, summary: { blueprint_count: int, replicated_class_count: int, replicated_variable_count: int, rpc_count: int } }
audit_static_meshes¶
Read-only
Sweep the StaticMesh assets under folder_path for: no simple collision (and not complex-as-simple, and not set to NoCollision), a high triangle count with no LODs and no Nanite, a missing lightmap UV channel when the project allows static lighting, too many material slots, and degenerate bounds (empty mesh, zero size on two axes, or absurdly large). Reads Asset Registry tags, so nothing is loaded; a mesh whose package predates those tags is loaded to read them, up to max_loads. Returns findings inline, paged with offset/limit; the summary counts every finding. Read-only.
| Parameter | Type | Required | Description |
|---|---|---|---|
folder_path |
string | no | Content folder to scan. Defaults to "/Game". |
recursive |
boolean | no | Recurse into subfolders. Defaults to true. |
max_triangles_without_lod |
number | no | LOD0 triangle count from which a mesh with a single LOD and no Nanite is reported. Defaults to 10000. |
max_material_slots |
number | no | Largest acceptable number of material slots. Defaults to 8. |
max_bounds_size |
number | no | Largest acceptable bounds size on any axis, in cm. Defaults to 1000000 (10 km). |
rules |
array | no | Rule ids to run, default all: mesh_no_collision, mesh_high_tris_no_lod, mesh_missing_lightmap_uv, mesh_too_many_materials, mesh_degenerate_bounds. An unknown id is an error. |
max_results |
number | no | Cap on meshes examined (1-100000). Defaults to 20000. |
max_loads |
number | no | Cap on meshes loaded because their tags are missing (0-5000; 0 never loads). Defaults to 200. |
offset |
number | no | Index of the first finding returned. Defaults to 0. |
limit |
number | no | Findings returned per call (1-5000). Defaults to 200. |
Returns: { folder_path, scanned: int, scan_truncated: bool, loaded_count: int, skipped_no_tags: int, static_lighting_allowed: bool, rules: [string], summary: { finding_count, by_severity: {error, warning, info}, by_rule: {rule: int} }, findings: [{ severity, rule, asset, message, suggested_fix, triangles?, lods?, nanite?, size?: [x,y,z] }], offset, limit, returned, next_offset: int|null }
audit_textures¶
Read-only
Sweep the Texture2D assets under folder_path for the settings that cost memory or look wrong: non-power-of-two size, oversized versus a threshold, no mips, normal maps without Normalmap compression or with sRGB on, sRGB on mask textures (ORM/roughness/AO...), a normal map or UI texture left in a generic texture group, and streaming disabled. Reads Asset Registry tags, so nothing is loaded; a texture whose package predates those tags is loaded to read them, up to max_loads. Returns findings inline, paged with offset/limit; the summary counts every finding. Read-only.
| Parameter | Type | Required | Description |
|---|---|---|---|
folder_path |
string | no | Content folder to scan. Defaults to "/Game". |
recursive |
boolean | no | Recurse into subfolders. Defaults to true. |
max_texture_size |
number | no | Largest acceptable dimension in pixels after Maximum Texture Size is applied. Defaults to 4096. |
rules |
array | no | Rule ids to run, default all: texture_non_power_of_two, texture_oversized, texture_no_mips, texture_normal_compression, texture_normal_srgb, texture_mask_srgb, texture_lod_group, texture_streaming_disabled. An unknown id is an error. |
max_results |
number | no | Cap on textures examined (1-100000). Defaults to 20000. |
max_loads |
number | no | Cap on textures loaded because their tags are missing (0-5000; 0 never loads). Defaults to 200. |
offset |
number | no | Index of the first finding returned. Defaults to 0. |
limit |
number | no | Findings returned per call (1-5000). Defaults to 200. |
Returns: { folder_path, scanned: int, scan_truncated: bool, loaded_count: int, skipped_no_tags: int, rules: [string], summary: { finding_count, by_severity: {error, warning, info}, by_rule: {rule: int} }, findings: [{ severity, rule, asset, message, suggested_fix, width?, height?, compression?, lod_group? }], offset, limit, returned, next_offset: int|null }
audit_widget_accessibility¶
Read-only
Sweep Widget Blueprints for the accessibility problems that are measurable from what was AUTHORED: text/background contrast against the WCAG 2.x threshold, text smaller than a legible minimum, interactive widgets with no accessible label for a screen reader, and buttons below a minimum touch/focus size. On console this is a CERTIFICATION requirement, not a nicety. READ THE LIMITS BEFORE TRUSTING A PASS: contrast is computed against the FIRST ancestor holding a solid colour -- a UBorder's brush, a UButton's WidgetStyle.Normal, or a flat UImage -- so a background painted by a texture, a material, a video or a sibling drawn underneath is INVISIBLE to this, and those cases come back as background_source:"none" rather than quietly passing, because "could not judge" and "fine" are different answers. A brush only counts when it has no ResourceObject, its TintColor is UseColor_Specified, and its DrawAs actually FILLS the middle: Box, Image or RoundedBox. DrawAs=Border is excluded on purpose (it tiles the sides and leaves the centre empty, which is exactly where the text sits). Colours coming from a CommonUI style asset or a property binding are equally invisible: only authored values are read. What IS exact is the maths -- relative luminance 0.2126R+0.7152G+0.0722B over LINEAR values (which is what an FLinearColor already is) and ratio (Llight+0.05)/(Ldark+0.05), straight from WCAG.
| Parameter | Type | Required | Description |
|---|---|---|---|
folder_path |
string | no | Content folder to sweep (default /Game). |
recursive |
boolean | no | Recurse into subfolders (default true). |
min_contrast_ratio |
number | no | Contrast floor for normal-size text (default 4.5, the WCAG AA rule). Text at or above large_text_size only needs 3.0, applied automatically. |
large_text_size |
number | no | Font size from which text counts as "large" for the contrast rule (default 18.0, per WCAG). |
min_font_size |
number | no | Smallest legible font size; anything under it is reported (default 12.0). |
min_touch_size |
number | no | Minimum width/height in pixels for an interactive widget's authored slot size (default 44.0, the common touch-target guideline). Only checkable when the slot actually carries a size -- an auto-sized slot reports size_known:false instead of a false pass. |
max_results |
number | no | Max Widget Blueprints to load (default 500). |
Returns: { folder_path, widget_blueprints_scanned, widgets_examined, issue_count, issues_by_kind: {low_contrast, contrast_unknown, small_text, missing_accessible_text, small_touch_target}, entries: [{ widget_bp_path, widget_name, widget_class, kind, detail, contrast_ratio?, required_ratio?, text_color?, background_color?, background_source?, font_size?, width?, height? }], truncated }
audit_widget_style¶
Read-only
Sweep Widget Blueprints and report every widget whose style DEVIATES from a reference widget -- the "who is off-theme" question, which is the one that scales badly by hand once there are more than a couple of screens. You designate one widget as the truth (reference_bp_path + reference_widget_name), list the property paths that define the style (dotted paths work: "WidgetStyle.Normal.TintColor"), and this reports, per matching widget, which of those paths differ and what each side holds. Comparison is on the property's exported text, so it is type-agnostic and reports a real difference rather than a formatting one. Pair it with apply_widget_style_preset, which can copy those same paths off that same reference widget to FIX what this finds.
| Parameter | Type | Required | Description |
|---|---|---|---|
reference_bp_path |
string | yes | /Game path of the Widget Blueprint holding the reference widget (the style source of truth). |
reference_widget_name |
string | yes | Name of the reference widget inside that Widget Blueprint. |
property_paths |
array | yes | The paths that define the style, e.g. ["WidgetStyle.Normal.TintColor","WidgetStyle.NormalPadding"]. A path that does not resolve on the REFERENCE is an error (the reference must define the style); one that does not resolve on a target is reported as unresolved, not as a deviation. |
folder_path |
string | no | Content folder to sweep for targets (default /Game). |
recursive |
boolean | no | Recurse into subfolders (default true). |
target_class |
string | no | Only compare widgets of this class, matched with IsA (defaults to the reference widget's own class, which is almost always what you want). |
include_matching |
boolean | no | Also report the widgets that already match (default false). |
max_results |
number | no | Max Widget Blueprints to load (default 500). |
Returns: { reference, property_paths, widget_blueprints_scanned, widgets_compared, deviating_count, matching_count, entries: [{ widget_bp_path, widget_name, widget_class, deviations: [{path, actual, expected}], unresolved_paths: [string], matches: bool }], truncated }
audit_widget_text¶
Read-only
Sweep Widget Blueprints and report which player-visible texts are typed INLINE rather than coming from a String Table -- the localization-maintainability question. NOTE: this corrects the intuition most people start with: a text written as a bare string is NOT lost to localization. Unreal assigns it a stable key when the package is saved, and FTextInspector::ShouldGatherForLocalization returns true, so it DOES get collected and translated. What it lacks is a MEANINGFUL identity: the namespace comes out empty and the key is an opaque GUID like 971E3B3B436AEE91028BA1ADB97B3046. That still costs -- translators see no context, and re-authoring the text churns the key, orphaning the translation. So this reports identity_kind per text: string_table (best), explicit (an author-given namespace/key), auto_key (typed inline, key generated on save) and none (never saved, no identity yet). Default output is everything that is NOT string_table or explicit.
| Parameter | Type | Required | Description |
|---|---|---|---|
folder_path |
string | no | Content folder to sweep (default /Game). Every UWidgetBlueprint under it is loaded and walked. |
recursive |
boolean | no | Recurse into subfolders (default true). |
include_all |
boolean | no | Also report the texts that already have a good identity, string_table and explicit ones included (default false). |
include_data_assets |
boolean | no | Also sweep DataTables and DataAssets under the same folder (default false). This is where an AAA game actually keeps its text -- item names, quest descriptions, tooltips -- and it is text the widget walk cannot reach, because there the FTexts sit in nested struct fields rather than on a widget class. Nested structs and arrays of structs are walked too. |
max_results |
number | no | Max Widget Blueprints to load (default 500). Loading a WBP is not free; a whole-project sweep is a heavy call. |
Returns: { folder_path, widget_blueprints_scanned, texts_examined, counts_by_identity: {string_table, explicit, auto_key, none}, not_gathered_count, entries: [{ widget_bp_path, widget_name, widget_class, property_name, text, identity_kind, will_be_gathered, namespace, key, string_table }], truncated } -- not_gathered_count is the engine's own ShouldGatherForLocalization saying a text will NOT be collected at all; in a saved asset that is normally 0, and anything above it is a real alarm.
capture_pie_state¶
Destructive
Snapshot of every actor in the ACTIVE PIE world, with every property flagged Replicated or SaveGame (generic -- no judgment call about what is "relevant"). It requires a live PIE session: with none running for pie_client_index it errors cleanly instead of silently snapshotting the EDITOR world, which is what makes it usable as co-op evidence -- point it at a client index to prove a value really replicated. On a large world ALWAYS pass class_filter and/or max_actors. Returns a summary plus a report path; read the detail with get_mcp_audit_report.
| Parameter | Type | Required | Description |
|---|---|---|---|
pie_client_index |
number | no | Which PIE client's world to snapshot (0 = first/server/standalone). Defaults to 0. |
class_filter |
string|array | no | Optional actor-class guardrail. Accepts a single class name OR an array of them. Detail: one class name or an array of them, each resolved to a UClass (object/script path, short name, or the Blueprint asset name -- "<Name>_C" is tried too) and matched with IsA, so subclasses match. An entry that does not resolve, or that resolves to a non-AActor class, is a hard ERROR rather than being dropped: dropping it would silently snapshot the whole World Partition world, keeping it would silently return an empty snapshot. Defaults to no filter (every actor). |
max_actors |
number | no | Optional cap on how many actors get their properties reflected into the report; 0 (the default) means UNLIMITED, and negative values are clamped to 0. Actors past the cap are still COUNTED (cheap) but not reflected (the expensive part), so total_matching_actors and truncated are exact, not estimated. |
Returns: { path: string, truncated: bool, summary: { actor_count: int, actors_seen: int, total_matching_actors: int, max_actors: int, truncated: bool, class_filter: [string], replicated_property_count: int, savegame_property_count: int, savegame_filter_status: "active"|"dead_in_this_run" }, report_size_bytes: int, verification: {...}, verification_checks: [...] } -- class_filter lists the resolved class paths; success is false when the report is missing or empty on disk.
get_mcp_audit_report¶
Read-only
Read back the FULL report that an audit_* or capture_pie_state command wrote to disk. Those commands return only a summary plus a path, so this is the second half of every one of them -- without it you never see the per-Blueprint / per-asset / per-actor detail. Restricted to Saved/MCPAudits/: it is not a general file reader.
| Parameter | Type | Required | Description |
|---|---|---|---|
path |
string | yes | Path returned by a prior audit command |
Returns: the full parsed JSON report object