選項
首頁首頁 Skill MCP 工具 msw-search

MSW 搜尋整合 — (1) 透過 msw-mcp MCP 伺服器進行 API 文件與實作指南的向量搜尋(mlua_api_retriever / mlua_document_retriever), (2) 透過 REST API 搜尋資源(Sprite / 動畫 / 音效 / 資源包 / 頭像)。 適用於「查找 .d.mlua 檔案中未收錄的詳細資訊、範例或相關 API」、「需要 SpriteRUID」、「怪物圖元」、 「背景圖片」、「尋找音效」、「頭像項目查詢」等情境。關鍵字:文件搜尋、API 詳情、範例、指南、檢索器、資源、Sprite、

...展開全部
10
更新時間 2026-08-27

關於msw-search

將 MSW 開發相關查詢導向兩個不同系統中的正確搜尋目標:透過 msw-mcp MCP 伺服器進行 API 文件與實作指南的向量搜尋,以及用於遊戲資源(例如圖元、動畫、音效、資源包和虛擬形象)的 REST API。 路由表決定請求應採取哪條路徑,將「請展示範例」或「有哪些相關 API」(文件搜尋)這類查詢,與獲取 SpriteRUID 或怪物圖元(資源搜尋)的請求區分開來。資源搜尋是取得 RUID 的唯一途徑。

針對文件,此技能會強制執行特定的查詢順序。當已知 API 名稱時,系統會優先查閱本機的 .d.mlua 類型存根,以獲取簽名、類型、屬性、事件參數及枚舉值。由於這些存根僅包含簽名,而缺乏說明與範例,因此會透過向量搜尋進行補充: mlua_api_retriever 會針對指定的 API 或元件,返回程式碼範例、參數詳細資訊、相關 API 以及 ScriptOverridable 標記;而 mlua_document_retriever 則會根據「要建構什麼」的自然語言描述,返回開發手冊與實作指南。 預設的查詢結果數量為三項;若發生任何 MCP 失敗,該技能會顯示錯誤並回退至 .d.mlua,而非進行推測。

針對資源,強烈建議優先搜尋 resource_pack 類型,因為一個包會整合單一資產的所有 sprite、動畫和音效;接著深入查詢 payload.elements 即可取得個別的 RUID。 若先選取散落的 sprite 或 animationclip,往往會導致實體僅含單一幀、未設定動畫,或屬於錯誤的資產家族;因此,該技能僅在接收到明確意圖(例如背景音樂檔案、單一 sprite 或虛擬形象道具)時,才會切換資源類型。 對照表比較了 .d.mlua 提供的內容與完整搜尋結果的差異,而轉換表則將範例中的 Maker Editor 語法轉譯為 .mlua 檔案語法——將覆寫映射至方法, 大括號對應結尾,以及編輯器中的 exec-space 切換對應 @ExecSpace 註解——需注意,覆寫的 @ExecSpace 必須與父級宣告的位元組完全匹配,否則將觸發 LEA-3014 SignatureMismatch 錯誤。

常見問題

這項技能可以搜尋哪兩類內容?

它會透過 msw-mcp 伺服器的向量搜尋來檢索 API 文件與實作指南,並透過 REST API 搜尋遊戲資源(貼圖、動畫、音效、資源包、虛擬形象)。資源搜尋是取得 RUID 的唯一途徑。

尋找 API 時,應該先查閱 .d.mlua 還是先進行向量搜尋?

當您已知 API 名稱時,請務必先閱讀 .d.mlua,因為它能精確提供簽名、類型、屬性、事件參數及枚舉值。僅在 .d.mlua 的簽名內容不足時才使用向量搜尋,例如當您需要程式碼範例或各參數的詳細資訊時。

為何這項技巧建議從 resource_pack 開始進行資源搜尋?

資源包會將單一資產的所有 sprite、動畫和音效打包在一起,因此先搜尋資源包並深入檢視 payload.elements,能獲得連貫的 RUID。若先挑選單一 sprite 或 animationclip,通常會導致該實體僅剩單一幀、未設定動畫,或屬於錯誤的資產家族。

mlua_api_retriever 與 mlua_document_retriever 之間有何差異?

mlua_api_retriever 會針對指定的 API、類別、函式或元件,回傳 API 層級的詳細資訊,例如簽名、參數、範例以及相關 API。mlua_document_retriever 則會回傳類似文件格式的資料,例如創作手冊和指南,並接受以自然語言撰寫的句子來描述您想要實作的內容。

為什麼我的覆寫會因 LEA-3014 SignatureMismatch 而失敗?

搜尋結果範例採用 Maker Editor 語法,其中父元素的執行空間通常是隱藏且可切換的。在 .mlua 檔案中,覆寫的 @ExecSpace 必須與 .d.mlua 中的父元素在位元組層面上完全一致;若父元素沒有 @ExecSpace,則覆寫必須完全省略此欄位。

所有檔案

6 個檔案references/resource/detail.md 3.8KB 檢視SKILL.md 28.2KB 檢視references/resource/browse.md 6.8KB 檢視scripts/msw_resource_api.cjs 23.6KB 檢視 references/resource/avatar.md 4.5KB 檢視 references/resource/search.md 11.2 KB 檢視
在 GitHub 上查看

MSW has two distinct search targets:

  1. API docs & implementation guides — Vector search for descriptions, code examples, and related APIs missing from .d.mlua.
  2. Resources — REST API for sprites, animations, sounds, resource packs, and avatars. The only path for obtaining RUIDs.

Routing Table

Request typeGo 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 → start with resource_pack
"Find an animation / sound / resource pack"Resource search → start with resource_pack
"Details for this RUID", "Similar resources"Resource search
"Avatar item / default avatar lookup"Resource search
"Upload / list / update / delete my own assets"Call msw-mcp asset_* tools directly
"Set sprite pivot", "set 9-slice border", "slice boundary for UI RUID", "asset properties"Call msw-mcp asset_update_resource_storage_info directly (properties: [{ key, value }]pivot_x/y, border_left/right/top/bottom, filter_mode, wrap_mode)

★ Resource search default — always resource_pack first

Unless the user explicitly asks for an individual sprite / animationclip / sound / avatar item (or names a non-pack RUID directly), pass resourceTypeFilter: ["resource_pack"] to searchResources. A pack bundles every sprite + animation + sound for one asset, so picking a stray sprite or animationclip first usually leaves the entity with a single frame, no animation set, or the wrong asset family.

Search the pack → drill into payload.elements → assign individual RUIDs.Switch types only on explicit intent: "BGM file", "individual sprite only", "avatar item", "animationclip similar to this RUID", etc.

Section 1 — Document Search (APIs & Guides)

Vector search via the msw-mcp MCP server. Supplies the detailed descriptions, code examples, related APIs, and implementation guides missing from .d.mlua.

Decision Flow

Need API-related information│├─ Checking signature / type / property / enum│   → Read .d.mlua first (highest priority)│   → If .d.mlua is insufficient, call msw-mcp│     (code examples, parameter details, related APIs, etc.)│├─ Implementation guide / pattern / best practice│   → mlua_document_retriever│└─ Don't know the API name (semantic search)    → mlua_api_retriever (and/or mlua_document_retriever for broader scope)

API Research Order

Priority 1 — .d.mlua (always first)

If you know the API name, always read .d.mlua first. Signatures, types, properties, event parameters, and enum values can be confirmed here accurately.

Path: Environment/NativeScripts/{Component,Service,Event,Enum,Logic,Misc}/Name.d.mlua

SituationExample
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?"

Priority 2 — Vector search (when .d.mlua is not enough)

.d.mlua contains only signatures and lacks detailed descriptions and examples. Use vector search when you need any of the following.

SituationMCP toolExample query
Need a code examplemlua_api_retrieverAIComponent example, BehaviorTree usage
Parameter detailsmlua_api_retrieverBadgeService GetBadgeInfosAndWait parameters
Related API cross-referencesmlua_api_retrieverAttackComponent related, HitComponent
ScriptOverridable checkmlua_api_retrieverAttackComponent CalcCritical override
Don't know the API nameboth retrieversdamage calculation, inventory save
"How do I …?" implementation guidemlua_document_retrieverhow to make inventory system
Pattern / best practicemlua_document_retrievercollision detection best practice

MCP Tools (msw-mcp)

ToolDescription
mlua_api_retrieverAPI details for Service / Component / Misc etc. (signatures, parameters, examples). Pass an API/class/function/component name.
mlua_document_retrieverAuthoring manuals, guidelines, MLua usage, and other document-style material. Pass a natural-language sentence describing what to implement.

On failure: If a msw-mcp tool call errors out, surface the failure to the user and fall back to .d.mlua. Do not guess — state what you couldn't verify.

Default result count: request 3 results unless wider exploration is explicitly required.

.d.mlua vs Search — Information Comparison

.d.mlua is a type stub (~29 lines); Search returns the full document (254+ lines).

Information.d.mluaSearch
Method signature / typesOO
Property declarationsOO
Detailed method description (DetailDesc)XO
Code examples (AdditionalPageContent)XO
Per-parameter descriptionsXO
Related APIs (SeeAlsoAPIs)XO
Related guides (SeeAlsoGuides)XO
ScriptOverridable flagXO
SyncDirectionPartialO
Localized descriptions (Ko/Ja/Es/Zh)XO

Maker Editor Syntax → .mlua Conversion Rules

Code examples in search results use Maker Editor syntax. They must be converted before being used in a local .mlua file.

ItemMaker Editor.mlua fileNote
Override declarationoverride integer CalcDamage(...)method integer CalcDamage(...)overridemethod
Block{ ... }... endBraces → end
Exec space (own method)[server only]@ExecSpace("ServerOnly")Self-defined methods: annotate explicitly
Exec space (override)[server only] shown / omitted in editorMatch the parent's @ExecSpace exactly — see warning belowLEA-3014 if mismatched
PropertyProperty: int32 Score = 0@Sync property int32 Score = 0Add @Sync if synced
Type intintintegerC# int → mlua integer
Type numbernumbernumberSame (double)
Type floatfloatfloatSame (single)

number (64-bit double) and float (32-bit single) are assignable to each other but remain distinct types. Follow the .d.mlua declaration.

⚠ Override ExecSpace caveat — LEA-3014 SignatureMismatch

The Maker Editor often hides the parent's exec space and lets you toggle [server only] freely on an override block. In .mlua, however, the override's @ExecSpace must be byte-identical to the parent declared in .d.mlua. If the parent has no @ExecSpace (engine default = ExecSpace=All), the override must also omit @ExecSpace entirely.

Concretely, the AttackComponent / HitComponent damage hooks (CalcDamage, CalcCritical, GetCriticalDamageRate, GetDisplayHitCount, IsAttackTarget, IsHitTarget, OnAttack) are all ExecSpace=All upstream. Adding @ExecSpace("ServerOnly") produces:

[LEA-3014] SignatureMismatch : The signature of <Child>.CalcDamage[... (ExecSpace=ServerOnly)]  must match the overridden <Parent>.CalcDamage.[... (ExecSpace=All)].

Always look up the parent in .d.mlua first and copy its annotation block verbatim. Detail: msw-scripting/SKILL.md §9 "Method override → LEA-3014".

Conversion example — AttackComponent from search results:

-- 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-- ⚠ Parent AttackComponent.CalcDamage / CalcCritical declare no @ExecSpace--   (ExecSpace=All). Adding @ExecSpace here triggers LEA-3014 SignatureMismatch.method integer CalcDamage(Entity attacker, Entity defender, string attackInfo)    return 50endmethod boolean CalcCritical(Entity attacker, Entity defender, string attackInfo)    return _UtilLogic:RandomDouble() < 0.3end

Section 2 — Resource Search (Sprite / Animation / Sound / Resource Pack / Avatar)

REST API for searching and browsing MSW resources.Never guess or fabricate a RUID — always obtain one through this API.

Default search type = resource_pack — see the pack-first rule under the Routing Table above.

Access — always go through msw_resource_api.cjs

All resource-API calls in this skill are made through the Node.js wrapper

scripts/msw_resource_api.cjs

Do not assemble curl commands by hand. The wrapper:

  • Sends UTF-8 JSON bodies directly, so non-ASCII queries (Korean / Japanese / Chinese / emoji) avoid the {"detail":"There was an error parsing the body"} failure mode that hits inline curl -d '...'.
  • URL-encodes slash-containing path parameters (e.g. pack IDs like npc/1013617.img).
  • Zero dependencies (Node 18+ built-in fetch / AbortController).
  • Uses the exact OpenAPI field names (topK, resourceTypeFilter, categoryFilter, count, …). Legacy names like limit / types / categories are silently ignored by the server.

Two ways to use it:

# 1) CLI — fire one call from a shell. Output is pretty-printed JSON.node scripts/msw_resource_api.cjs \    search "orange mushroom" --resource-type resource_pack --category npc --topK 3# Discover available subcommands:node scripts/msw_resource_api.cjs --help
// 2) require — preferred when already in a Node.js context.const {  searchResources, searchAvatarItems, findSimilarResources,  getResource, getResourcesBatch, getResourceTags,  listResources, randomResources, findPacksContaining,  listAvatars, getAvatarDefaults,} = require('./scripts/msw_resource_api.cjs');const result = await searchResources("orange mushroom", {  resourceTypeFilter: ["resource_pack"],  categoryFilter: ["npc"],  topK: 3,});

Wrapper function ↔ endpoint map

Wrapper functionCLI subcommandEndpoint
searchResourcessearchPOST /v3/search/resources
searchAvatarItemssearch-avatarPOST /v3/search/resources (avatar mode)
findSimilarResourcessimilarGET /v3/search/resources/similar/{ruid}
getResourcegetGET /v3/resources/{ruid} (works for sprite / animationclip / resource_pack / avataritem)
getResourcesBatchbatchPOST /v3/resources/batch
getResourceTagstagsGET /v3/resources/tags/{ruid}
listResourceslistGET /v3/resources (Qdrant Scroll, opaque-string offset cursor)
randomResourcesrandomGET /v3/resources/random
findPacksContainingpacksGET /v3/resources/packs/{ruid} (lists packs containing a RUID — pack id is NOT accepted here)
listAvatarsavatarsGET /v3/avatars
getAvatarDefaultsavatar-defaultsGET /v3/avatars/defaults

No /v3/avatars/{ruid} endpoint exists. To inspect an avataritem(color_hex, group members, …), call getResource(ruid) — the/v3/resources/{ruid} endpoint returns avataritem detail just likeany other resource.

Base URL & transport (informational)

The wrapper handles all of this — you do not need to set it manually.

  • Base URL: https://maplestoryworlds-resourcesearch-new.nexon.com/api
  • No auth (public), /v3/ prefix, POST bodies are application/json; charset=utf-8
  • Default timeout: 15s (override via the wrapper's _request(method, path, { timeout }))

Result count — this skill's default is 3

Unless explicitly told otherwise, always send 3 for the result-count parameteron every search call. The wrapper defaults to 3 as well, and parameter names followthe OpenAPI spec exactly — note that limit / count / topK differ per endpoint.

EndpointServer parameterWrapper default
POST /v3/search/resources (resources + avatar)topK3
GET /v3/search/resources/similar/{ruid}topK3
GET /v3/resources (browsing)limit3
GET /v3/resources/randomcount3
GET /v3/resources/packs/{ruid} (packs containing a RUID)limit3

The server-side default is 20 or 50, so always pass these parameters explicitly.Increase to 10+ (or 50–100 for avatar broad-browse) only when wider exploration is explicitly required.

offset parameter caveat — for GET /v3/resources and GET /v3/resources/packs/{ruid},offset is not an integer but the opaque string cursor nextOffset returned by the previous response.Do not send it on the first page (sending integer 0 is interpreted as a cursor and returns empty results).

POST body rule — let msw_resource_api.cjs handle it

If you must POST without the wrapper (no HTTP client in your language), reproduce its behaviour:

  1. Serialize the body as UTF-8 JSON bytes (not a re-encoded shell string).
  2. Send Content-Type: application/json; charset=utf-8.
  3. POST raw bytes (e.g. curl's --data-binary "@file" reading a UTF-8 temp file).

Otherwise, just call the wrapper.

Resource Types

type values (the type field on server responses, and the values you putinto the resourceTypeFilter array when searching):

typeDescription
spriteStatic image (PNG)
animationclipFrame-based animation
resource_packFinished asset bundling sprites + animations + sounds
bgmBackground music (audio)
voiceVoice clip — NPC dialogue, etc. (audio)
effectSound effect (audio). Not a visual effect. For visual particles / hit / skill FX, search sprite or animationclip (categories skill / mob / etc).
avataritemAvatar costume item (cap, coat, pants, shoes, weapon, …) — same POST /v3/search/resources endpoint with resourceTypeFilter: ["avataritem"]. See references/resource/search.md ("Avatar Item Search") and references/resource/avatar.md.

All search and listing endpoints use the same type-filter field name: resourceTypeFilter(an array). Other names like types are silently ignored by the server.The wrapper's resource_type_filter argument (or CLI --resource-type) maps to this field.

SpriteRendererComponent.SpriteRUID accepts both sprite and animationclip, but renders them differently:

  • animationclip → all frame layers play (shadow + body + foreground)
  • sprite → that single Sprite renders only

Symptom of mistake: feeding an animationclip RUID where you intended a sprite (or vice-versa) leaves only the shadow layer visible — the body silently vanishes. Always check payload.type of the response before assigning to SpriteRUID. Use sprite for the static idle/default frame; use animationclip only for fields like StateAnimationComponent.ActionSheet values.

skeleton and avataritem RUIDs fail silently (no error, nothing renders) when assigned to SpriteRUID / ImageRUID without the thumbnail:// prefix. Conversely, CostumeManagerComponent.Custom*Equip / SkeletonRendererComponent.SkeletonRUID / StateAnimationComponent.ActionSheet do not accept the thumbnail:// prefix — pass a plain RUID there. If the search query targeted an icon / thumbnail image and returned a sprite RUID, that RUID is already renderable directly — adding thumbnail:// is redundant. Full assignment rules — accepted types, slot-by-slot prefix matrix, RUID-vs-prefix usage — live in msw-sprite-ruid/SKILL.md.

Categories

category values that actually appear on responses. Use these with categoryFilter.

General resources (sprite / animationclip / resource_pack / bgm / voice / effect)

categoryDescription
mobMonster
npcNPC
itemItem
skillSkill effect / skill resources
objectMap object (tree, rock, decoration)
backgroundBackground / map tile / BGM
footholdWalkable platform
ropeRope
ladderLadder
etcUncategorized

Avatar (avataritem only)

categorySlot
cap, hair, face, faceaccessory, eyeaccessory, earaccessoryHead / face
coat, longcoat, pants, shoes, glove, capeBody
weapon, twohandweapon, subweapon, shieldWeapon

map, effect, ui are not valid category values — they return zero results.

  • Looking for maps / backgrounds → category: "background" or "object".
  • Looking for visual effects → search sprite / animationclip with category: "skill" (or mob/etc); effect is the audio resource_type, not a category.
  • There is no ui resource family in this index — UI sprites usually live as sprite + category: "etc".

RUID

A 32-character hex string that uniquely identifies every resource. Example: "0017da7385e04bc4b2ddbe5949b4b462"

  • The id field in search results is the RUID
  • assetGuid is a separate Unity asset GUID (used in spawn_preset)
  • Never guess or fabricate a RUID — always obtain it from an API response

Common Response Fields

{  "id": "32-char hex RUID",  "type": "sprite|animationclip|resource_pack|bgm|voice|effect|avataritem",  "category": "mob|npc|item|skill|object|background|foothold|rope|ladder|etc | <avatar slot>",  "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": []  }}

Pagination — same name, two flavors

nextOffset appears in every list-style response but means different things depending on the endpoint. Round-tripping a value into the wrong endpoint silently misbehaves.

EndpointnextOffset typeMeaningHow to paginate
POST /v3/search/resources (search)integerItem offset (0-based)Pass it back as offset (number)
GET /v3/search/resources/similar/{id} (similar)integerItem offsetSame
GET /v3/resources (list)opaque UUID stringQdrant Scroll cursorPass the string back as offset. End-of-stream = null
GET /v3/resources/packs/{ruid} (packs)opaque UUID stringSame cursorSame
GET /v3/resources/randomn/aNo pagination

Rules:

  1. Never feed a list cursor into a search call (or vice versa) — the server ignores the wrong-shape value and returns the first page.
  2. On the first page, omit offset entirely. Sending integer 0 to list / packs is interpreted as a cursor and yields zero items (silent failure).
  3. Stop paginating when the response returns nextOffset: null (list / packs) or returns fewer items than topK (search / similar).

Endpoint Summary

MethodEndpointPurpose
POST/v3/search/resourcesNatural-language semantic search (incl. avatar items via resourceTypeFilter: ["avataritem"])
GET/v3/search/resources/similar/{ruid}Find similar resources
GET/v3/resources/{ruid}Single resource details (sprite / animationclip / resource_pack with populated elements / avataritem)
POST/v3/resources/batchBatch fetch multiple resources
GET/v3/resources/tags/{ruid}AI-generated multilingual tags
GET/v3/resourcesList resources (Qdrant Scroll, opaque-string offset cursor)
GET/v3/resources/randomRandom resource recommendation
GET/v3/resources/packs/{ruid}List resource packs containing the given RUID — the path parameter is a 32-char-hex RUID, not a pack id
GET/v3/avatarsList all avatar items (cached)
GET/v3/avatars/defaultsDefault avatar body / head RUIDs

Single avataritem detail uses /v3/resources/{ruid} (no/v3/avatars/{ruid} endpoint exists).

Resource Routing Guide

★ When in doubt, search resource_pack first. Only the rows marked with anexplicit non-pack intent below should bypass the pack-first default.

SituationWrapper call (CLI subcommand)Reference file
"Find a slime / orange mushroom / monster / NPC / item / background / map asset" (default — no type specified)searchResources(query, { resourceTypeFilter: ["resource_pack"], ... }) (search ... --resource-type resource_pack)references/resource/search.md
"Find an individual sprite / single image" (user explicitly asked for a sprite)searchResources(query, { resourceTypeFilter: ["sprite"], ... })references/resource/search.md
"Find an individual animationclip" (user explicitly asked for an animation)searchResources(query, { resourceTypeFilter: ["animationclip"], ... })references/resource/search.md
"Find a visual effect / particle / hit FX"searchResources(query, { resourceTypeFilter: ["animationclip","sprite"], categoryFilter: ["skill","mob","etc"] }) — note: effect here would mean audio, not visualreferences/resource/search.md
"Find a sound / BGM / voice / sound-effect" (audio)searchResources(query, { resourceTypeFilter: ["bgm"|"voice"|"effect"], ... })effect resource_type = sound-effect (audio)references/resource/search.md
"Find a background / map tile / scenery"searchResources(query, { resourceTypeFilter: ["sprite","animationclip"], categoryFilter: ["background","object"] }) — there is no map category in the indexreferences/resource/search.md
"Find a costume / hat / shoes / weapon (avatar item)"searchAvatarItems(...) (search-avatar)references/resource/search.md (Avatar Item Search section) + references/resource/avatar.md
"Any more monsters like this one?"findSimilarResources(ruid, ...) (similar)references/resource/search.md
"Details for RUID abc123" (any type incl. avataritem and resource_pack)getResource(ruid) (get)references/resource/detail.md
"Show me a list of monster sprites"listResources(...) (list)references/resource/browse.md
"Which resource packs include this RUID?"findPacksContaining(ruid, ...) (packs)references/resource/browse.md
"Browse all avatar items"listAvatars(...) (avatars)references/resource/avatar.md

Typical Workflow (pack-first)

1. searchResources(query, { resourceTypeFilter: ["resource_pack"], topK: 3 })   → obtain a resource_pack RUID (or pack id like "npc/9072309.img")   → switch types only on explicit user intent, or fall back when 0 packs match2. getResource(id)   → resource_pack: payload.elements is pre-populated with element payloads                    (sprite / animationclip / sound RUIDs live here)   → avataritem:    payload has color_hex / group meta3. Pick the element from payload.elements and assign its RUID to   SpriteRendererComponent.SpriteRUID / StateAnimationComponent.ActionSheet   (or assign avataritem RUIDs through the slot mapping in `msw-avatar`)

Don't call findPacksContaining(packId) to "open" a pack — that endpoint takes a 32-hex RUID and returns the packs that include that RUID, not the contents of a pack. Use getResource(packId) for pack contents.

For detailed Request/Response of each endpoint, refer to the files under references/resource/.

Sprite Orientation — Most Resources Face Left

Most MSW sprite / animationclip / resource_pack assets — especially mob, npc, and player-character — are authored facing left, so a freshly spawned SpriteRendererComponent renders left unless you flip it.

SituationWhat to do
Spawn an entity that should face rightSet FlipX = true on SpriteRendererComponent (default is false = left-facing as authored)
Custom AI / chase using MovementComponent:MoveToDirectionUpdate FlipX on direction change: sprite.FlipX = velocity.x > 0 (right ⇒ flip)
Monster model / monster collider alignmentInvert TransformComponent.Scale.x instead of FlipX so the sprite and collider stay aligned; see msw-general/references/monster.md
Native AIChaseComponent / AIWanderComponentEngine flips automatically based on movement — do nothing
Top-down (RectTile) movementDecide per-axis: usually flip when dx > 0; sprites with up/down frames need the StateAnimationComponent action set instead
_EffectService:PlayEffect(...) should face rightPass FlipX = true in the options table
Player-attached effect must follow the player's facingUse SyncFlip = true in PlayEffect options, or read PlayerControllerComponent.LookDirectionX
Resource is authored facing right (rare)Inspect payload.thumbnail via GET /v3/resources/{ruid} and invert the rule for that asset
-- Custom side-view chase: flip sprite to match movement directionlocal sprite = self.Entity.SpriteRendererComponentlocal selfX = self.Entity.TransformComponent.WorldPosition.xlocal dx    = targetPos.x - selfXif dx ~= 0 then    sprite.FlipX = dx > 0   -- target on the right → flipend

Sanity check — the left-facing convention is not contractual. Open payload.thumbnail from GET /v3/resources/{ruid} to confirm.

Do not use TransformComponent.Scale.x as a general renderer flip — for players / effects / non-monster renderers, use SpriteRendererComponent.FlipX. Monster exception: monster models should invert TransformComponent.Scale.x so the sprite and collider stay aligned. Related: msw-combat-system/SKILL.md "Direction check ★", msw-general/references/monster.md.

Shared Tips

  1. Keyword choice — Use the exact name if you know it; natural-language Korean/English also works.
  2. Adjust the page-size parameter — the name differs per endpoint (topK for search/similar, limit for list/packs, count for random). This skill's default is 3 (see the "Result count" table above). Keep it at 3 for precise lookups; increase to 10+ (or 50–100 for avatar broad-browse) only when wider exploration is required.
  3. When search fails:
    • Document search fails → read .d.mlua directly.
    • Resource search fails → retry with synonyms or a different category; browse with listResources(...) (CLI: list) by type/category.
    • POST returns {"detail":"There was an error parsing the body"} → you bypassedthe wrapper and sent JSON inline via curl -d '{...}'. Switch tomsw_resource_api.cjs (or replicate its UTF-8 raw-body POST pattern) asdescribed in Section 2.
  4. Composite queries are allowed — e.g. AttackComponent CalcCritical for docs, red slime jump for resources.
  5. No guessing — Never guess API names, RUIDs, or enum values; always confirm via search or references.

安裝 msw-search

請下載並將技能檔案解壓縮至您的 .claude/skills/ 目錄中。

下載 ZIP

複製儲存庫並將技能檔案複製到您的專案中。

git clone https://github.com/MSW-Git/msw-ai-coding-plugins-official/blob/main/plugins/msw-maker-base-skill/skills/msw-search/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

複製 複製
快速設定: 將技能資料夾複製到 .claude/skills/,Claude 會自動偵測並使用該技能

相關技能

office-mcp
更新時間 2026-07-13
mcpgraph
更新時間 2026-06-29
composio
更新時間 2026-06-29
connect-mcp-server
更新時間 2026-06-29
OR