Loading...
Loading...
MSW search integration — (1) vector search for API docs and implementation guides (msw-guide-mcp or curl against mlua_Document_Retriever / mlua_API_Retriever), (2) REST API search for resources (sprite / animation / sound / resource pack / avatar). Use for 'find details, examples, or related APIs not in .d.mlua', 'need a SpriteRUID', 'monster sprite', 'background image', 'find a sound', 'avatar rendering', etc. Keywords: document search, API details, examples, guide, retriever, resource, sprite, animation, sound, RUID, resource pack, avatar.
npx skill4agent add msw-git/msw-ai-coding-plugins-official msw-search.d.mlua| Request type | Go to section |
|---|---|
| "How do I implement this?", "Show me an example", "What related APIs exist?" | Document search |
| ".d.mlua only has the signature; the description is insufficient" | Document search |
| "I don't know the API name (semantic search)" | Document search ( |
| "Implementation guide / best practice / pattern" | Document search ( |
| "I need a SpriteRUID", "Find a sprite for monster / NPC / background" | Resource search |
| "Find an animation / sound / resource pack" | Resource search |
| "Details for this RUID", "Similar resources" | Resource search |
| "Avatar rendering / default avatar" | Resource search |
.d.mlua| Method | Condition | Usage |
|---|---|---|
| MCP tool | | Call |
| Direct curl | Fallback when MCP is not connected | |
Need API-related information
│
├─ Checking signature / type / property / enum
│ → Read .d.mlua first (highest priority)
│ → If .d.mlua is insufficient, use vector search
│ (code examples, parameter details, related APIs, etc.)
│
├─ Implementation guide / pattern / best practice
│ → Vector search (type=document)
│
├─ Don't know the API name (semantic search)
│ → Vector search (type=both)
│
└─ How to access vector search:
├─ msw-guide-mcp connected? → MCP tool
└─ Not connected → curl.d.mluaEnvironment/NativeScripts/{Component,Service,Event,Enum,Logic,Misc}/Name.d.mlua| Situation | Example |
|---|---|
| Confirm method signature | "Does TransformComponent have SetPosition?" |
| Property type / existence | "What is the type of SpriteRendererComponent.RUID?" |
| Event parameter structure | "What are the AttackEvent constructor parameters?" |
| List of enum values | "What are the BodyMoveType values?" |
| Method existence | "What methods does SpawnService have?" |
.d.mlua| Situation | Search type | Example query |
|---|---|---|
| Need a code example | | |
| Parameter details | | |
| Related API cross-references | | |
| ScriptOverridable check | | |
| Don't know the API name | | |
| "How do I …?" implementation guide | | |
| Pattern / best practice | | |
MCP mapping:=mlua_API_Retriever,type=api=mlua_Document_Retriever.type=document
msw-guide-mcp| Tool | Maps to type | Description |
|---|---|---|
| | API details for Service / Component / Misc etc. (signatures, parameters, examples) |
| | Authoring manuals, guidelines, MLua usage, and other document-style material |
Tool names and parameters follow the latest MCP schema.
msw-guide-mcpGET http://10.10.200.51:31817/search?q={query}&type={type}&limit={limit}| Parameter | Required | Value | Description |
|---|---|---|---|
| O | string | Search query (natural language or API name) |
| X | | Search scope (default: |
| X | integer | Max results (default: 5) |
type| Intent | type |
|---|---|
| Specific API spec (parameters, return type, example) | |
| Implementation guidance (how-to, tutorial, concept) | |
| Ambiguous or broad scope | |
# Specific API details + example
curl "http://10.10.200.51:31817/search?q=AIComponent&type=api&limit=5"
# Implementation guide
curl "http://10.10.200.51:31817/search?q=how+to+make+an+inventory+system&type=document&limit=5"
# Semantic search (when exact API name is unknown)
curl "http://10.10.200.51:31817/search?q=collision+detection&type=both&limit=10"{
"results": "formatted text with matching documents (title, section, content)"
}| Code | Meaning | Action |
|---|---|---|
| Service is starting up | Retry after a short wait |
| Internal error (OpenSearch) | Fall back to |
| Connection failure | Service not running | Fall back to |
.d.mlua| Information | .d.mlua | Search |
|---|---|---|
| Method signature / types | O | O |
| Property declarations | O | O |
| Detailed method description (DetailDesc) | X | O |
| Code examples (AdditionalPageContent) | X | O |
| Per-parameter descriptions | X | O |
| Related APIs (SeeAlsoAPIs) | X | O |
| Related guides (SeeAlsoGuides) | X | O |
| ScriptOverridable flag | X | O |
| SyncDirection | Partial | O |
| Localized descriptions (Ko/Ja/Es/Zh) | X | O |
.mlua| Item | Maker Editor | .mlua file | Note |
|---|---|---|---|
| Override declaration | | | |
| Block | | | Braces → |
| Exec space | | | Annotation must be explicit |
| Property | | | Add |
Type | | | C# int → mlua integer |
Type | | | Same (double) |
Type | | | Same (single) |
(64-bit double) andnumber(32-bit single) are assignable to each other but remain distinct types. Follow thefloatdeclaration..d.mlua
-- Maker Editor syntax (search result)
override int CalcDamage(Entity attacker, Entity defender, string attackInfo) {
return 50
}
override boolean CalcCritical(Entity attacker, Entity defender, string attackInfo) {
return _UtilLogic:RandomDouble() < 0.3
}-- Converted to .mlua
@ExecSpace("ServerOnly")
method integer CalcDamage(Entity attacker, Entity defender, string attackInfo)
return 50
end
@ExecSpace("ServerOnly")
method boolean CalcCritical(Entity attacker, Entity defender, string attackInfo)
return _UtilLogic:RandomDouble() < 0.3
endhttps://resourcesearch-api.future.msw.nxdev.kr/v3/application/json; charset=utf-8-d '...'/v3/search/resources/v3/resources/batch/v3/avatar/render--data-binary "@file"REQ="$TMPDIR/msw_req.json"
cat > "$REQ" <<'JSON'
{ "query": "주황버섯", "types": ["resource_pack"], "categories": ["mob"], "limit": 5 }
JSON
curl -s -X POST https://resourcesearch-api.future.msw.nxdev.kr/v3/search/resources \
-H "Content-Type: application/json; charset=utf-8" \
--data-binary "@$REQ"-d '{"query":"주황버섯",...}'{ "detail": "There was an error parsing the body" }$env:TEMP\msw_req.json$TMPDIR/msw_req.jsonSet-Content -Encoding utf8Out-File -Encoding utf8--data-binary "@file"| type | Description |
|---|---|
| Static image (PNG) |
| Frame-based animation |
| Finished asset bundling sprites + animations + sounds |
| Sound / audio clip |
| category | Description |
|---|---|
| Monster |
| NPC |
| Map / background / terrain |
| Item |
| Effect |
| Skill |
| UI element |
"0017da7385e04bc4b2ddbe5949b4b462"idassetGuidspawn_preset{
"id": "32-char hex RUID",
"type": "sprite|animationclip|resource_pack|sound",
"category": "mob|npc|map|item|effect|skill|ui",
"names": {
"ko": ["Korean name"],
"en": ["English name"]
},
"assetGuid": "Unity asset GUID (may or may not exist)",
"payload": {
"width": 64,
"height": 64,
"thumbnail": "https://...",
"pivot": {"x": 32, "y": 32},
"frames": [],
"elements": []
}
}| Method | Endpoint | Purpose |
|---|---|---|
| POST | | Natural-language semantic search |
| GET | | Find similar resources |
| GET | | Single resource details |
| POST | | Batch fetch multiple resources |
| GET | | AI-generated multilingual tags |
| GET | | List by type / category |
| GET | | Random resource recommendation |
| GET | | Resource pack details + components |
| GET | | Default avatar body / head RUIDs |
| GET | | Avatar item details |
| POST | | Render an avatar |
| Situation | Endpoint to use | Reference file |
|---|---|---|
| "Find a slime sprite" | | |
| "Any more monsters like this one?" | | |
| "Details for RUID abc123" | | |
| "Show me a list of monster sprites" | | |
| "What's inside this resource pack?" | | |
| "Render an avatar" | | |
1. Semantic search (POST /v3/search/resources) → obtain RUID
2. Detail lookup (GET /v3/resources/{ruid}) → inspect payload
3. For resource packs → pack details (GET /v3/resources/packs/{pack_id}) → individual element RUIDs
4. Assign the individual RUID to SpriteRendererComponent.SpriteRUIDFor detailed Request/Response of each endpoint, refer to the files under.references/resource/
limit.d.mluamod/APIMetadata/GET /v3/resourcesPOST{"detail":"There was an error parsing the body"}-d '{...}'--data-binary "@file"AttackComponent CalcCriticalred slime jump