Expand description
Model Context Protocol server exposed at the /mcp endpoint.
Wraps every Command the crate::background_thread dispatcher
understands as an MCP tool, plus a handful of MCP resources
(game lists, enum dumps, examples, reference docs) and prompts for
common workflows (“open and inspect a pack”, “edit a DB table”,
“manage dependencies”, …). Each MCP client gets its own dedicated
Session and McpServer — same isolation guarantees as the
WebSocket clients.
Each tool call:
- Translates its
*Argspayload into aCommandand ships it through the session’sbackground_loopvia thesend_and_respond!helper. - Wraps the resulting
Responseback into aCallToolResult.
The *Args structs are the canonical schema for every tool. Their
JsonSchema derive is what rmcp ships to clients to advertise tool
arguments, so docstrings on individual fields show up directly in MCP
tool listings.
Macros§
- parse_
json 🔒 - Parse a JSON string into the expected type, returning a tool-level error on failure.
- send_
and_ 🔒respond - Helper to send a command and return the JSON response.
Structs§
- AddKeys
ToKey Deletes Args - AddNote
Args - AddPacked
Files Args - AddPacked
Files From Animpack Args - AddPacked
Files From Pack File Args - AddPacked
Files From Pack File ToAnimpack Args - BoolArg
- Build
Starpos Args - Call
Command Args - Cascade
Edition Args - Change
Compression Format Args - Container
Path Arg - Container
Paths Arg - Copy
OrCut Packed Files Args - Decode
Packed File Args - Definition
Arg - Delete
From Animpack Args - Delete
Note Args - Diagnostics
Check Args - Diagnostics
Update Args - Duplicate
Packed Files Args - Export
Rigid ToGltf Args - Extract
Packed Files Args - GetPack
Translation Args - GetR
Files From AllSources Args - GetReference
Data From Definition Args - Global
Search Args - Global
Search Replace Matches Args - GoTo
Definition Args - Import
Dependencies Args - Initialize
MyMod Folder Args - McpServer
- MCP server bound to a single
Session. - Merge
Files Args - NewPacked
File Args - Open
Packed File InExternal Program Args - Open
Packfiles Args - Optimize
Pack File Args - Pack
KeyArg - Pack
KeyBool Arg - Pack
KeyPath Arg - Pack
KeyString Arg - Pack
KeyStrings Arg - Pack
MapArgs - Paste
Packed Files Args - PathArg
- Referencing
Columns ForDefinition Args - Rename
Packed Files Args - Save
Packed File From External View Args - Save
Packed File From View Args - Save
Packed Files ToPack File AndClean Args - Save
Schema Args - Schema
Patch Args - Search
References Args - SetDependency
Pack Files List Args - SetGame
Selected Args - SetPack
File Type Args - SetPack
Settings Args - SetVideo
Format Args - Settings
SetBool Args - Settings
SetF32 Args - Settings
SetI32 Args - Settings
SetPath BufArgs - Settings
SetString Args - Settings
SetVec RawArgs - Settings
SetVec String Args - String
Arg - String
I32Args - Strings
Arg - TsvExport
Args - TsvImport
Args - Update
Anim IdsArgs
Functions§
- resource 🔒
- Build an Annotated
with common fields set.