{"ok":true,"site":{"host":"roomcraft.nihsett.workers.dev","url":"https://roomcraft.nihsett.workers.dev/","type":"live","desc":"RoomCraft — rearrange your room with an agent via WebMCP","tools":[{"name":"get_room_state","kind":"answer","impl":"imperative","description":"Returns the current room layout. Coordinate system: origin (0,0) is the top-left corner. X increases rightward and Y increases downward. All measurements are in centimeters. Items have (x,y) at the top-left of their bounding box AFTER rotation; w and d are UNROTATED dimensions, so rotation 90/270 swaps the visual footprint. Also returns human_actions_since_last_call: every drag, rotate, add, or delete the human performed since your last tool call. Use it to understand what changed. For dinner guests, hosting, When seating a dining group, place each chair facing its table.","inputSchema":{"type":"object","properties":{},"required":[]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"move_item","kind":"act","impl":"imperative","description":"Move one furniture item to a new position. x and y are centimeters measured from the top-left corner of the room and identify the top-left corner of the item footprint. Fails if the item is out of bounds or overlaps another blocking item; rugs do not collide. Do not hand-place dining chairs blindly; seat them facing the table.","inputSchema":{"type":"object","properties":{"id":{"type":"string","description":"ID of the item to move"},"x":{"type":"number","description":"New x position in centimeters"},"y":{"type":"number","description":"New y position in centimeters"}},"required":["id","x","y"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"move_items","kind":"act","impl":"imperative","description":"Move multiple items simultaneously in one atomic batch. ALL moves are validated before ANY are applied. If one move is out of bounds or overlaps another blocking item, the entire batch is rejected and nothing moves. Use this for a coordinated room rearrangement; all accepted items animate together. Each move may optionally include rotation 0, 90, 180, or 270. When arranging dining chairs around a table, make every chair face the table.","inputSchema":{"type":"object","properties":{"moves":{"type":"array","description":"Array of item moves to apply atomically","items":{"type":"object","properties":{"id":{"type":"string","description":"Item ID"},"x":{"type":"number","description":"New x in centimeters"},"y":{"type":"number","description":"New y in centimeters"},"rotation":{"type":"number","enum":[0,90,180,270],"description":"Optional clockwise rotation"}},"required":["id","x","y"]}}},"required":["moves"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"rotate_item","kind":"act","impl":"imperative","description":"Set an item rotation to 0, 90, 180, or 270 degrees clockwise. Rotation 90/270 swaps the item width and depth visually. Fails if the rotated footprint is out of bounds or overlaps.","inputSchema":{"type":"object","properties":{"id":{"type":"string","description":"ID of the item to rotate"},"rotation":{"type":"number","enum":[0,90,180,270],"description":"Clockwise rotation in degrees"}},"required":["id","rotation"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"add_item","kind":"act","impl":"imperative","description":"Add furniture from the catalog. Valid types: sofa (220x90cm), loveseat (150x85cm), armchair (85x85cm), coffee-table (110x60cm), tv-stand (160x45cm), dining-table (160x90cm), dining-chair (45x45cm), bookshelf (90x35cm), bed-queen (160x210cm), desk (140x70cm), rug (200x140cm), plant (40x40cm). Dimensions are unrotated width x depth in centimeters. x,y is the top-left of the placed footprint. Fails if the item is out of bounds or overlaps blocking furniture; rugs are non-blocking. Dining chairs can be placed with add_item — aim each chair at the table it faces.","inputSchema":{"type":"object","properties":{"type":{"type":"string","description":"Furniture type from the catalog"},"x":{"type":"number","description":"X position in centimeters"},"y":{"type":"number","description":"Y position in centimeters"},"rotation":{"type":"number","enum":[0,90,180,270],"description":"Optional clockwise rotation; defaults to 0"}},"required":["type","x","y"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"remove_item","kind":"act","impl":"imperative","description":"Remove a furniture item from the room by its ID.","inputSchema":{"type":"object","properties":{"id":{"type":"string","description":"ID of the item to remove"}},"required":["id"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"measure_distance","kind":"act","impl":"imperative","description":"Measure the nearest-edge gap between two item bounding boxes in centimeters. Returns 0 when their footprints overlap. The distance is measured using the effective rotated footprints.","inputSchema":{"type":"object","properties":{"idA":{"type":"string","description":"First item ID"},"idB":{"type":"string","description":"Second item ID"}},"required":["idA","idB"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"check_clearance","kind":"answer","impl":"imperative","description":"Run the clearance checker between every pair of doors. It tests whether a person or wheelchair can walk through the room without crossing blocking furniture, using the current clearanceCm setting (80cm default; use 90cm or more for wheelchair access). Results appear as green passing and red failing path overlays. Returns each path and its blocking item IDs.","inputSchema":{"type":"object","properties":{},"required":[]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"set_clearance_mode","kind":"act","impl":"imperative","description":"Set the minimum walkway clearance width in centimeters. The accepted range is 80-120cm. Use 80cm for standard walking and 90cm or more for wheelchair accessibility. Call check_clearance afterward to re-evaluate the current room.","inputSchema":{"type":"object","properties":{"cm":{"type":"number","description":"Clearance width in centimeters, from 80 to 120"}},"required":["cm"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"set_room","kind":"act","impl":"imperative","description":"Replace room dimensions and openings. Origin is the top-left; width is the x-axis and depth is the y-axis, all in centimeters. Items outside the new room are clamped to the nearest fit. For N/S openings, offset is measured from the left; for E/W openings, offset is measured from the top. Each opening has wall N/S/E/W, offset, width, and kind door/window.","inputSchema":{"type":"object","properties":{"width":{"type":"number","description":"Room width in centimeters"},"depth":{"type":"number","description":"Room depth in centimeters"},"openings":{"type":"array","items":{"type":"object","properties":{"wall":{"type":"string","enum":["N","S","E","W"]},"offset":{"type":"number","description":"Offset along the wall in centimeters"},"width":{"type":"number","description":"Opening width in centimeters"},"kind":{"type":"string","enum":["door","window"]}},"required":["wall","offset","width","kind"]}}},"required":["width","depth","openings"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"suggest_positions","kind":"answer","impl":"imperative","description":"Return up to 5 valid, non-overlapping positions for an existing item. Coordinates are in centimeters from the room top-left. Wall-snapped positions are prioritized, followed by interior positions. This does not move the item.","inputSchema":{"type":"object","properties":{"id":{"type":"string","description":"Existing item ID"}},"required":["id"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"highlight_item","kind":"act","impl":"imperative","description":"Briefly highlight an item on the canvas with a warm pulsing outline for two seconds. Use this to visually point at an item while explaining it to the user.","inputSchema":{"type":"object","properties":{"id":{"type":"string","description":"ID of the item to highlight"}},"required":["id"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"save_layout","kind":"act","impl":"imperative","description":"Save the current room, furniture, and clearance setting to browser storage under a name.","inputSchema":{"type":"object","properties":{"name":{"type":"string","description":"Name for the saved layout"}},"required":["name"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"load_layout","kind":"act","impl":"imperative","description":"Load a previously saved layout by name, replacing the current room state.","inputSchema":{"type":"object","properties":{"name":{"type":"string","description":"Saved layout name"}},"required":["name"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"list_layouts","kind":"answer","impl":"imperative","description":"List all saved layout names in browser storage.","inputSchema":{"type":"object","properties":{},"required":[]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"place_facing","kind":"act","impl":"imperative","description":"Rotate a directional furniture item so its front faces toward another item. For example, rotate a sofa to face the TV. Only changes rotation, not position.","inputSchema":{"type":"object","properties":{"id":{"type":"string","description":"ID of the item to rotate"},"target_id":{"type":"string","description":"ID of the item to face toward"}},"required":["id","target_id"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"place_against_wall","kind":"act","impl":"imperative","description":"Move a furniture item flush against a wall with its back to the wall and front facing into the room. Optionally specify an offset along the wall in centimeters from the wall's start.","inputSchema":{"type":"object","properties":{"id":{"type":"string","description":"ID of the item to place"},"wall":{"type":"string","enum":["N","S","E","W"],"description":"Which wall to place against"},"offset":{"type":"number","description":"Optional position along the wall in centimeters"}},"required":["id","wall"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"critique_layout","kind":"act","impl":"imperative","description":"Analyze the current furniture layout and return warnings about issues: seating facing walls instead of the TV, chairs too far from tables, TV not facing seating, etc. Call this after making changes to verify the layout makes sense.","inputSchema":{"type":"object","properties":{},"required":[]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"}],"apiSurface":"spec","category":"Media & Personal","toolCount":18}}