feat(intelligence): expose MCP instance icon options#1848
Merged
Conversation
Contributor
Reviewer's GuideExpose supported Minecraft instance icon options to MCP clients by adding a new retrieval tool and enriching the Sequence diagram for MCP client using instance icon optionssequenceDiagram
actor McpClient
participant McpServer
McpClient->>McpServer: retrieve_instance_icon_options
McpServer-->>McpClient: builtinIconPaths, customIconSrc, automaticDefaultDescription
McpClient->>McpServer: create_instance icon_src
McpServer-->>McpClient: instance_created_response
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The list of built-in icon paths is now duplicated between
retrieve_instance_icon_optionsand thecreate_instance.icon_srcschema description; consider centralizing this list in a single source to avoid future drift. - The
icon_srcschemars description has become quite long and dense; consider breaking this behavior out into more structured metadata (or referencingretrieve_instance_icon_optionsmore succinctly) to keep the schema description readable.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The list of built-in icon paths is now duplicated between `retrieve_instance_icon_options` and the `create_instance.icon_src` schema description; consider centralizing this list in a single source to avoid future drift.
- The `icon_src` schemars description has become quite long and dense; consider breaking this behavior out into more structured metadata (or referencing `retrieve_instance_icon_options` more succinctly) to keep the schema description readable.
## Individual Comments
### Comment 1
<location path="src-tauri/src/intelligence/mcp_server/launcher/tools/instance.rs" line_range="146" />
<code_context>
+ #[schemars(description = "Optional instance icon source. Omit to let SJMCL pick automatically: OptiFine uses `/images/icons/OptiFine.png`; Fabric, Forge/LegacyForge, NeoForge, LiteLoader, and Quilt use their matching `/images/icons/*.png`; otherwise snapshots use `/images/icons/JEIcon_Snapshot.png`, old beta uses `/images/icons/StoneOldBeta.png`, April Fools versions use `/images/icons/YellowGlazedTerracotta.png`, and releases use `/images/icons/JEIcon_Release.png`. Supported built-in icon paths are `/images/icons/JEIcon_Release.png`, `/images/icons/JEIcon_Snapshot.png`, `/images/icons/CommandBlock.png`, `/images/icons/CraftingTable.png`, `/images/icons/GrassBlock.png`, `/images/icons/StoneOldBeta.png`, `/images/icons/YellowGlazedTerracotta.png`, `/images/icons/Anvil.png`, `/images/icons/Forge.png`, `/images/icons/Fabric.png`, `/images/icons/NeoForge.png`, `/images/icons/Quilt.png`, and `/images/icons/OptiFine.png`. Pass `custom` only when the instance root already has a custom icon file to display.")]
</code_context>
<issue_to_address>
**issue:** The description mentions LiteLoader having a matching icon, but the built-in icon path list does not include a LiteLoader icon.
The description claims LiteLoader has a matching `/images/icons/*.png`, but the listed supported built-in paths do not include a LiteLoader icon (e.g. `/images/icons/LiteLoader.png`). This inconsistency may mislead clients using `retrieve_instance_icon_options` or the schema. Please either add the LiteLoader icon path or revise the description so it doesn’t imply a supported LiteLoader icon that isn’t listed.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
UNIkeEN
requested changes
Jul 12, 2026
| #[schemars(description = "Optional instance description. Defaults to an empty string.")] | ||
| description: Option<String>, | ||
| #[schemars(description = "Optional instance icon source. Defaults to the selected OptiFine/mod loader icon, or the standard icon for the selected game version type.")] | ||
| #[schemars(description = "Optional instance icon source. Omit to let SJMCL pick automatically: OptiFine uses `/images/icons/OptiFine.png`; Fabric, Forge/LegacyForge, NeoForge, LiteLoader, and Quilt use their matching `/images/icons/*.png`; otherwise snapshots use `/images/icons/JEIcon_Snapshot.png`, old beta uses `/images/icons/StoneOldBeta.png`, April Fools versions use `/images/icons/YellowGlazedTerracotta.png`, and releases use `/images/icons/JEIcon_Release.png`. Supported built-in icon paths are `/images/icons/JEIcon_Release.png`, `/images/icons/JEIcon_Snapshot.png`, `/images/icons/CommandBlock.png`, `/images/icons/CraftingTable.png`, `/images/icons/GrassBlock.png`, `/images/icons/StoneOldBeta.png`, `/images/icons/YellowGlazedTerracotta.png`, `/images/icons/Anvil.png`, `/images/icons/Forge.png`, `/images/icons/Fabric.png`, `/images/icons/NeoForge.png`, `/images/icons/Quilt.png`, and `/images/icons/OptiFine.png`. Pass `custom` only when the instance root already has a custom icon file to display.")] |
Owner
There was a problem hiding this comment.
这里就不用列举这些 /images/icons/... 了吧,可以在这里提醒模型如果要 pick built-in、去调用上面那个 tool
| #[schemars(description = "Minecraft game version ID, for example `1.21.5`.")] | ||
| game_version: String, | ||
| #[schemars(description = "Optional mod loader type: `unknown`, `fabric`, `forge`, `legacyforge`, `neoforge`, or `quilt`. Defaults to `unknown`.")] | ||
| #[schemars(description = "Optional mod loader type: `unknown`, `fabric`, `forge`, `legacyforge`, `neoforge`, `liteloader`, or `quilt`. Defaults to `unknown`.")] |
UNIkeEN
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
This PR is a ..
Related Issues
Follow-up to #1846.
Description
This PR exposes the supported instance icon sources through MCP.
It adds
retrieve_instance_icon_options, which returns the built-in icon paths accepted bycreate_instance.icon_src, including icons such asCommandBlock.png,CraftingTable.png,GrassBlock.png, andAnvil.png. Thecreate_instancetool description now points MCP clients to this option list when choosing a manual instance icon.The
create_instance.icon_srcschema description also documents the automatic default icon behavior and the specialcustomvalue.Additional Context
Verified with:
cargo fmt --manifest-path src-tauri/Cargo.toml --checkcargo check --manifest-path src-tauri/Cargo.tomlSummary by Sourcery
Expose supported Minecraft instance icon options through MCP and document automatic and custom icon behaviors for instance creation.
New Features:
customoption.Enhancements:
create_instancetool description and schema to reference the icon options helper and clarify automatic default icon selection and supported icon paths.liteloader.