Skip to content

feat: add SpriteAtlas management commands#6

Merged
jcornill merged 1 commit intoAnkleBreaker-Studio:integrationfrom
zaferdace:feat/spriteatlas-commands
Apr 2, 2026
Merged

feat: add SpriteAtlas management commands#6
jcornill merged 1 commit intoAnkleBreaker-Studio:integrationfrom
zaferdace:feat/spriteatlas-commands

Conversation

@zaferdace
Copy link
Copy Markdown
Contributor

Summary

Adds 7 new commands for managing Unity SpriteAtlases via MCP:

Route Command Description
spriteatlas/create CreateSpriteAtlas Create new atlas asset
spriteatlas/info GetSpriteAtlasInfo Get packables, texture/packing settings
spriteatlas/add AddToSpriteAtlas Add sprites/textures/folders with type validation
spriteatlas/remove RemoveFromSpriteAtlas Remove packables with truthful reporting
spriteatlas/settings SetSpriteAtlasSettings Update packing/texture settings
spriteatlas/delete DeleteSpriteAtlas Delete atlas asset
spriteatlas/list ListSpriteAtlases Find atlases in project

Design

  • Follows existing command patterns (MCPTextureCommands)
  • Consistent Dictionary<string, object> return types
  • Safe input validation with helper methods (GetString, GetBool, GetInt, GetStringList)
  • Type checking for packables (only Texture2D, Sprite, DefaultAsset accepted)
  • Truthful reporting: add/remove track notFound, invalidType, notInAtlas separately

Testing

All 7 commands tested in Unity 6 (6000.3.10f1) via execute_code:

  • Create ✅, Info ✅, Add (with notFound) ✅, Remove (with notInAtlas) ✅
  • Settings (with empty params error) ✅, List ✅, Delete ✅

Companion PR

Server-side tool definitions: https://github.com/AnkleBreaker-Studio/unity-mcp-server — PR pending

New tools for creating, inspecting, and managing Unity SpriteAtlases:
- spriteatlas/create: create new atlas with optional settings
- spriteatlas/info: get atlas details (packables, settings)
- spriteatlas/add: add sprites/folders to atlas with validation
- spriteatlas/remove: remove packables with truthful reporting
- spriteatlas/settings: update packing/texture settings
- spriteatlas/delete: delete atlas asset
- spriteatlas/list: find atlases in project

Includes input validation, type checking for packables, and
consistent Dictionary<string, object> return types matching
existing command patterns (MCPTextureCommands).
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.

2 participants