Skip to content

Make the Blueprint finder smart about name clashes and mixed path formats #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zenoengine
Copy link
Contributor

@zenoengine zenoengine commented May 2, 2025

Summary & Motivation

Generic LLM agents often supply Blueprint identifiers in inconsistent formats (simple names, package paths, Reference strings, etc.), leading to missed or incorrect spawns—especially when duplicate names exist.
This patch adds a normalization layer that aims to resolve input paths as accurately as possible across common formats and, when clashes occur, returns clear choices so users can pick the correct asset.

This issue isn’t confined to this tool; it’s a recurring, predictable challenge when building tools for any LLM‑powered agent. I’m opening this PR to propose a solution and refine it together.

Related Issues

Key Changes

Area Update
FUnrealMCPCommonUtils::FindBlueprintAssets Rewrite: input normalisation, FARFilter search confined to UBlueprint assets, support for relative/absolute paths
FUnrealMCPEditorCommands::HandleSpawnBlueprintActor Uses new resolver function; returns:
• single match → spawns actor
• no match → error JSON
• multiple matches → choices array for user choice

Screenshots – Expected Behavior

spawn_bp_1
spawn_bp_2

zenoengine added 2 commits May 2, 2025 04:44
- Implemented logic to handle multiple assets with the same name by prompting the user to select the desired asset.
- Enhanced `HandleSpawnBlueprintActor` to support spawning actors from Blueprint assets
- Refactored `FindBlueprintAssets` to normalize input paths, handle "Copy Reference" formats, and improve asset filtering using `FARFilter`.
- Added support for relative and absolute paths in Blueprint asset searches.
- Added `CreateAssetChoicesResponse` function to `FUnrealMCPCommonUtils` for generating JSON responses with asset choices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant