fix: improve tool descriptions with explicit cross-references (rebased #694)#733
fix: improve tool descriptions with explicit cross-references (rebased #694)#733dsarno merged 1 commit intoCoplayDev:betafrom
Conversation
Update descriptions on manage_gameobject, find_gameobjects, and manage_components to use explicit "NOT for X — use Y tool" phrasing and include full resource URIs. This helps LLMs route to the correct tool instead of guessing based on parameter names. Each tool now clearly states: - What it does (positive) - What it does NOT do and which tool/resource to use instead (negative) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefines the textual descriptions and guidance for the Unity MCP tools Flow diagram for selecting between find_gameobjects, manage_gameobject, manage_components, and component resourcesflowchart TD
A[Need to work with a GameObject or its components?] --> B{What is the primary goal?}
B --> C[Search for GameObjects by name, tag, layer, component type, or path]
B --> D[Create, modify, delete, duplicate, or move a GameObject]
B --> E[Add, remove, or set properties on components]
B --> F[Read component data only]
C --> G[Use tool: find_gameobjects]
G --> H["Then use resource: mcpforunity://scene/gameobject/{id} for full GameObject data"]
G --> I["Or use resource: mcpforunity://scene/gameobject/{id}/components for component details"]
D --> J[Use tool: manage_gameobject]
J --> J1[Actions: create, modify, delete, duplicate, move_relative]
E --> K{Is this about components or GameObjects themselves?}
K --> L[Components only]
K --> M[GameObjects lifecycle or structure]
L --> N[Use tool: manage_components]
N --> N1[Actions: add, remove, set_property]
M --> J
F --> O["Use resource: mcpforunity://scene/gameobject/{id}/components"]
F --> P["Or resource: mcpforunity://scene/gameobject/{id}/component/{name} for a single component"]
subgraph Explicit_NOT_for_guidance
J -. NOT for searching: use find_gameobjects .-> G
J -. NOT for component management: use manage_components or components resources .-> N
N -. NOT for creating or deleting GameObjects: use manage_gameobject .-> J
G -. For CRUD operations on GameObjects: use manage_gameobject .-> J
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughUpdated decorator descriptions and error messages across three tool files (find_gameobjects, manage_components, manage_gameobject) to provide expanded usage guidance, clarify search and component management capabilities, and redirect users to appropriate tools for specific operations. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The emphasis style in the user-facing strings is a bit inconsistent (e.g.,
NOT for searching,For READING,To SEARCH, capitalizedCOMPONENTS); consider normalizing the tone and casing across all tool descriptions and error messages for a more uniform UX. - Since the descriptions now reference alternative tools and resources, it may be worth standardizing whether you mention the full
mcpforunity://...URI vs. just the tool name (e.g.,manage_gameobject,manage_components) so that cross-references are consistent between tools.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The emphasis style in the user-facing strings is a bit inconsistent (e.g., `NOT for searching`, `For READING`, `To SEARCH`, capitalized `COMPONENTS`); consider normalizing the tone and casing across all tool descriptions and error messages for a more uniform UX.
- Since the descriptions now reference alternative tools and resources, it may be worth standardizing whether you mention the full `mcpforunity://...` URI vs. just the tool name (e.g., `manage_gameobject`, `manage_components`) so that cross-references are consistent between tools.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary
Rebased version of #694 by @HivemindMinion to resolve merge conflicts after #688 landed on beta.
Original PR: #694
Original author: @HivemindMinion / @HivemindOverlord
manage_gameobject,find_gameobjects, andmanage_componentsto use explicit "NOT for X — use Y tool" phrasingConflict resolution: took #694's description text over #688's overlapping changes in
manage_gameobject.py(which is the whole point of #694).Summary by Sourcery
Clarify responsibilities and cross-references among scene tooling functions for GameObject search, GameObject CRUD, and component management without changing behavior or parameters.
Enhancements:
Documentation:
Summary by CodeRabbit