Find Widget Skill
Purpose: Find a clickable widget in the game UI without flooding main context.
When to use:
- •Need to find a widget to click (cooking interface, dialogue options, buttons)
- •Using scan_widgets() directly would flood context (~13k tokens)
- •Need widget_id for CLICK_WIDGET command
Input: Text or name to search for (e.g., "shrimp", "Cook", "Bank")
Execution Steps
1. Scan All Widgets
Call the MCP tool:
code
scan_widgets()
This returns all visible widgets with their IDs, text, names, bounds, and actions.
2. Filter Results
Search for widgets matching the user's query:
- •Check
textfield (case-insensitive) - •Check
namefield (case-insensitive, often contains item names) - •Check
actionsarray (e.g., "Cook", "Bank", "Talk-to")
3. Return Compact Results
Return ONLY these fields for matching widgets:
json
{
"found": 2,
"widgets": [
{
"widget_id": 17694735,
"text": "Raw shrimps",
"actions": ["Cook"],
"bounds": {"x": 210, "y": 391, "width": 100, "height": 75}
}
]
}
Output Format
code
Found [N] widget(s) matching "[query]":
1. widget_id: [ID]
text/name: [text]
actions: [action list]
bounds: x=[x], y=[y], w=[w], h=[h]
2. ...
To click: send_command("CLICK_WIDGET [widget_id]")
If no widgets found:
code
No widgets found matching "[query]" Suggestions: - Check if the interface is open - Try a different search term - Use scan_widgets() to see all available widgets
Example Usage
User says: "find cooking widget for shrimps"
- •Call scan_widgets()
- •Search for "shrimp" in name/text fields
- •Search for "Cook" in actions
- •Return:
code
Found 1 widget matching "shrimp":
1. widget_id: 17694735
name: Raw shrimps
actions: ["Cook"]
bounds: x=210, y=391, w=100, h=75
To click: send_command("CLICK_WIDGET 17694735")
User says: "find bank deposit button"
- •Call scan_widgets()
- •Search for "deposit" in text/name
- •Return matching widgets with IDs
Important Notes
- •Run as Haiku - This skill MUST run with model=haiku to avoid flooding context
- •Return compact results - Never return full widget objects
- •Include widget_id - This is the critical piece for clicking
- •Include bounds - Helps user verify it's the right widget
- •Suggest CLICK_WIDGET - Show the command to use the result