MCP: Entities (#192) #206
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
needs-info
needs-triage
question
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/ai-studio!206
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-192-mcp-entities"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #192.
With these tools, a harness can complete and tidy what script import found.
Tools
list_entitieslists the Characters, Locations, Location folders and Props.read_characterreturns one Character with its identity fields, its Looks (each with its effective identity and default wardrobe), its Wardrobe items and its voice set.create_character,rename_character,set_character_identity,delete_characterandmerge_characters.create_look,rename_look,set_look_identity(the overrides),set_look_default_wardrobe,set_default_lookanddelete_look.create_wardrobe_item,rename_wardrobe_item,set_wardrobe_textanddelete_wardrobe_item.create_location,rename_location,set_location_description,set_location_ambience,delete_locationandmerge_locations.create_location_folder,rename_location_folder,delete_location_folderandmove_location.create_prop,rename_prop,set_prop_descriptionanddelete_prop.read_lightingreturns the Lighting list with its phrases, and the slug table.add_lighting,rename_lighting,reorder_lighting,remove_lighting,set_lighting_phrase,set_slug_lightingandremove_slug_lightingeach returnread_lighting.How the tools reply
undobrings the deleted thing back.read_character(ageBuild,distinctiveFeatures…), and the core validates them.set_default_look,set_look_default_wardrobeandset_wardrobe_textgo a little beyond the ticket.set_default_lookis necessary because the core refuses to delete the default Look. The other two fill in Look and Wardrobe text that prompts use.Creating from a Line
create_characterandcreate_proptake an optionalfromLineId. This works the same way as making an Entity from a selection in the script view: an unknown Line is refused, and the reply includessourceLineId. The Project does not store the link, because the core keeps no link today. We agreed to match the app for now. #205 tracks storing the link.Tests
src-tauri/tests/mcp_entities.rshas one test per acceptance criterion:undo.It also covers the Lighting and slug-table tools, and checks that every tool returns
noProjectOpenwhen no Project is open. The import and edit-with-change-event helpers moved totests/common/mcp.rs, andmcp_script.rsuses them too.