{"openapi":"3.1.0","info":{"title":"Mastermind Security Design agent API","version":"1","description":"Draft designs for professional review. Not a certified design. The same tools are available over MCP at /mcp."},"servers":[{"url":"https://mastermindsecuritydesign.com/api/v1"}],"paths":{"/tools/get_workspace":{"post":{"operationId":"get_workspace","summary":"Workspace","description":"Workspace name, plan, role, and whether AI agents are allowed. Does not show a usage cap.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/list_projects":{"post":{"operationId":"list_projects","summary":"List projects","description":"Projects in this workspace: id, name, updated time, and open_url for each design. The response also names the workspace.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/get_project_summary":{"post":{"operationId":"get_project_summary","summary":"Project summary","description":"Floors, calibration, standards profile and counts, plus workspace_id, workspace_name and open_url. No calculated coverage.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/list_catalogue":{"post":{"operationId":"list_catalogue","summary":"Catalogue","description":"Library entries. kind lenses lists one line per lens size with its typical angle. kind presets lists every exact camera as its own focal length. The id is stable, for example TUR-019@6mm, and the label includes that lens’s horizontal and vertical field of view. field_source is datasheet at a published end and calculated for a focal length between the ends. Optional group, resolution and focal_mm narrow the list. A focal_mm that is not a listed step still returns the nearest listed size; place_camera then accepts that focal_mm inside the model’s range and marks it calculated unless it is an end. Older generic preset ids and lens_id are still accepted by place_camera.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["lenses","camera types","resolutions","sensor formats","presets","standards profiles","door hardware","detectors"]},"group":{"type":"string"},"resolution":{"type":"string"},"focal_mm":{"type":"number"}},"required":["kind"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/run_coverage_check":{"post":{"operationId":"run_coverage_check","summary":"Coverage check","description":"Pixel density at each camera design point under min(M1, M3h, M3v), the level reached, pass or fail, and covered area. Read-only. Nothing is saved.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"floor_id":{"type":"string"},"camera_ids":{"type":"array","items":{"type":"string"}}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/get_design_report":{"post":{"operationId":"get_design_report","summary":"Design report","description":"Structured design report: summary, per-camera results, warnings and open items, plus the company and author that an export would print. Read-only.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/create_project":{"post":{"operationId":"create_project","summary":"Create project","description":"Start a new project. Does not change any existing project. The result includes workspace_id, workspace_name and open_url for the saved design.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"standards_profile_id":{"type":"string"}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/set_floor_plan":{"post":{"operationId":"set_floor_plan","summary":"Set floor plan","description":"Attach a PNG or JPG, or state a width and depth in metres. Nothing is placed until the plan is calibrated.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"floor_id":{"type":"string"},"image_base64":{"type":"string"},"mime":{"type":"string"},"pixel_w":{"type":"number"},"pixel_h":{"type":"number"},"width_m":{"type":"number"},"depth_m":{"type":"number"}},"required":["project_id","base_version"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/calibrate_plan":{"post":{"operationId":"calibrate_plan","summary":"Calibrate plan","description":"Two image points and the real distance in metres. Required before walls or cameras are placed on an image. Optional check_p1, check_p2 and check_distance_m record a second measured distance so the calibration can be checked.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"floor_id":{"type":"string"},"p1":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"additionalProperties":true},"p2":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"additionalProperties":true},"distance_m":{"type":"number"},"check_p1":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"additionalProperties":true},"check_p2":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"additionalProperties":true},"check_distance_m":{"type":"number"}},"required":["project_id","base_version","p1","p2","distance_m"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/add_walls":{"post":{"operationId":"add_walls","summary":"Add walls","description":"Add walls in metres. Existing walls stay. The plan must already be calibrated.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"floor_id":{"type":"string"},"walls":{"type":"array","items":{"type":"object","properties":{"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"additionalProperties":true}},"height_m":{"type":"number"},"label":{"type":"string"}},"additionalProperties":true}},"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"additionalProperties":true}},"height_m":{"type":"number"}},"required":["project_id","base_version"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/place_camera":{"post":{"operationId":"place_camera","summary":"Place camera","description":"Place one camera. lens_mm picks a lens size and its typical angle; resolution_w and resolution_h set the pixels and do not change the horizontal angle; hfov_deg and vfov_deg override that angle with a datasheet figure. camera_type sets the symbol only. preset_id and lens_id are still accepted. Mount height, bearing, target height and distance are required. label sets the camera id (for example CAM-05); without it the next free CAM-xx is used. Optional: mount_type, camera_type, ir_range_m, installation_notes, status (proposed, confirmed, needs-survey). required_level or purpose (Identify, Recognise, Observe, Detect, or a profile level name) sets the operational requirement used for pass or fail. snap_to_wall true moves the camera onto the inner face of the nearest drawn wall, 0.1 m clear of that face on the side the bearing looks, and sets the mount to wall. A wall mount more than 0.5 m from a drawn wall, or a mount above the floor-to-ceiling height, is reported as a warning.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"floor_id":{"type":"string"},"preset_id":{"type":"string"},"lens_mm":{"type":"number"},"hfov_deg":{"type":"number"},"vfov_deg":{"type":"number"},"lens_id":{"type":"string"},"focal_mm":{"type":"number"},"sensor_format_id":{"type":"string"},"resolution_w":{"type":"number"},"resolution_h":{"type":"number"},"x_m":{"type":"number"},"y_m":{"type":"number"},"mount_height_m":{"type":"number"},"bearing_deg":{"type":"number"},"target_height_m":{"type":"number"},"distance_m":{"type":"number"},"required_level":{"type":"string"},"purpose":{"type":"string"},"snap_to_wall":{"type":"boolean"},"label":{"type":"string"},"mount_type":{"type":"string"},"camera_type":{"type":"string"},"ir_range_m":{"type":"number"},"installation_notes":{"type":"string"},"status":{"type":"string","enum":["proposed","confirmed","needs-survey"]}},"required":["project_id","base_version","x_m","y_m","mount_height_m","bearing_deg","target_height_m","distance_m"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/set_camera_requirement":{"post":{"operationId":"set_camera_requirement","summary":"Set camera requirement","description":"Add an operational requirement for one camera. The level is an IEC 62676-4:2025 profile level, or Detect, Observe, Recognise or Identify mapped onto that profile. Pass or fail uses min(M1, M3h, M3v).","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"camera_id":{"type":"string"},"required_level":{"type":"string"},"purpose":{"type":"string"}},"required":["project_id","base_version","camera_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/add_door":{"post":{"operationId":"add_door","summary":"Add door","description":"Add a door in a wall: leaf and swing symbol, width, hinge side (start or end) and swing (left or right). A new version only. Nothing is deleted.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"floor_id":{"type":"string"},"wall_id":{"type":"string"},"centre_m":{"type":"number"},"x_m":{"type":"number"},"y_m":{"type":"number"},"width_m":{"type":"number"},"hinge":{"type":"string","enum":["start","end"]},"swing":{"type":"string","enum":["left","right"]}},"required":["project_id","base_version"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/add_window":{"post":{"operationId":"add_window","summary":"Add window","description":"Add a window in a wall, with width, sill and the same hinge and swing fields as a door. A new version only. Nothing is deleted.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"floor_id":{"type":"string"},"wall_id":{"type":"string"},"centre_m":{"type":"number"},"x_m":{"type":"number"},"y_m":{"type":"number"},"width_m":{"type":"number"},"hinge":{"type":"string","enum":["start","end"]},"swing":{"type":"string","enum":["left","right"]}},"required":["project_id","base_version"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/export_pdf":{"post":{"operationId":"export_pdf","summary":"Export PDF","description":"Design report PDF, including the floor-plan image. A draft notice is added. The figures match the design tool.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/export_dxf":{"post":{"operationId":"export_dxf","summary":"Export DXF","description":"Plan DXF in metres. Open it in AutoCAD. A draft notice is added. The drawing matches the design tool.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/export_ifc":{"post":{"operationId":"export_ifc","summary":"Export IFC","description":"IFC4 Design Transfer View, in metres, for Autodesk Revit. Walls, openings, doors, windows, columns, racking, cameras and other devices, cable routes and wall sleeves. Camera view volumes are on the layer MSD_ViewVolumes, which can be switched off. The file uses the project company and author. IFC2x3 is not offered.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/export_xlsx":{"post":{"operationId":"export_xlsx","summary":"Export spreadsheet","description":"Schedule workbook. A draft notice is added. The schedule figures match the design tool.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/export_project":{"post":{"operationId":"export_project","summary":"Download project file","description":"The same .msdz file the design tool saves. Open it in MSD to keep editing.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/get_project_file":{"post":{"operationId":"get_project_file","summary":"Get project file (.msdz)","description":"Fetches the saved design as the .msdz file the design tool saves, the same file export_project returns. Use it to fetch a project file by id. Read-only.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/describe_capabilities":{"post":{"operationId":"describe_capabilities","summary":"Describe capabilities","description":"Lists every design tool, catalogue and lens range the agent can use. Read-only. Call this before a new kind of work.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/get_project_state":{"post":{"operationId":"get_project_state","summary":"Project state","description":"The current design: floors, walls, openings, cameras, requirements, access doors, devices, cables, intruder devices, scene objects, offshore zones, monitors, the proposal, and the company and author an export would print. Read-only.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/read_calculations":{"post":{"operationId":"read_calculations","summary":"Read calculations","description":"The same checks the web app shows. kind is coverage, gaps, cables, network, access, intruder or hvm. gaps also needs floor_id. Read-only.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"kind":{"type":"string","enum":["coverage","gaps","cables","network","access","intruder","hvm"]},"floor_id":{"type":"string"}},"required":["project_id","kind"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/list_versions":{"post":{"operationId":"list_versions","summary":"List versions","description":"Version history of one project: id, label and time. The newest is current. Read-only.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/restore_version":{"post":{"operationId":"restore_version","summary":"Restore version","description":"Saves an older version as the newest version. Older versions are kept. Example: { project_id, base_version, version_id }.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"version_id":{"type":"string"}},"required":["project_id","base_version","version_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/edit_plan":{"post":{"operationId":"edit_plan","summary":"Plan","description":"Floors, walls, openings, columns, obstacles, scene objects, targets, layers, and imports. action: add_floor, set_floor (name, ceiling_m), delete_floor, add_wall (label), update_wall (colour, colour_exterior, finish, finish_exterior), update_opening (frame_colour, leaf_colour), update_solid (id, colour, label, height_m — colour blank uses the default), set_appearance (floor_colour, roof_colour, frame_colour, leaf_colour, cable_colour, view_volumes, show_cables). view_volumes true or false turns the 3D view cones on or off (default on). show_cables true or false shows or hides the routed cables (default on). cable_colour is a hex colour, blank for the default blue. delete_object, duplicate_opening, add_column (label), add_obstacle (label), add_scene (item_id, label — use item_id text for a room name), update_scene (label, colour, or patch), move_scene, rotate_scene, delete_scene, add_target (label, target_type), update_target (label, x_m, y_m, height_m, width_m, facing or facing_deg), delete_target (target_id), add_pin, set_layer, import_pdf, import_dxf, import_map, import_osm, import_model. A blank colour clears the choice so the default is used. Distances are metres. import_pdf uses pdf_base64. import_dxf uses dxf_base64 and places LINE and LWPOLYLINE geometry as walls (metres_per_unit, default 1). import_map uses lat, lon, width_m, depth_m and optional image_base64. import_osm uses osm_text. import_model uses model_base64 and filename.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"action":{"type":"string"},"confirm":{"type":"boolean"}},"required":["project_id","base_version","action"],"additionalProperties":true}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/edit_camera":{"post":{"operationId":"edit_camera","summary":"Camera","description":"Change or remove a camera. action: update, delete, duplicate, set_typical_stream. update accepts lens_mm (a lens size and its typical angle), hfov_deg and vfov_deg (a datasheet angle, which overrides the typical one), preset_id (an exact camera; it sets the lens, sensor and resolution, and focal_mm must lie in that model range), label (the camera id, for example CAM-05), x_m, y_m, mount_height_m, mount_type (wall, ceiling, pole, pendant, corner), camera_type, resolution_w, resolution_h, sensor_format_id, bearing_deg, tilt_deg, tilt_mode (manual, auto-centre, auto-top-edge), roll_deg, focal_mm, lens_id, orientation, distance_m, target_height_m, ir_range_m, installation_notes, status (proposed, confirmed, needs-survey), supply (poe, 12vdc, 24vac, poc), poe_class, max_w, current_a, min_v, snap_to_wall. snap_to_wall true moves the camera onto the inner face of the nearest drawn wall, 0.1 m clear of that face on the side the bearing looks, and sets the mount to wall. A wall mount is expected within 0.5 m of a drawn wall; further away, or a mount above the floor-to-ceiling height, is a warning. A tilt_deg sets manual tilt. set_typical_stream uses the same typical stream as a new camera in the web app, with optional retention_days and recorder_id. confirm_figures true records those figures as entered (so the datasheet warning does not fire) and sets PoE at max_w watts, default 12.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"action":{"type":"string"},"confirm":{"type":"boolean"}},"required":["project_id","base_version","action"],"additionalProperties":true}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/edit_requirements":{"post":{"operationId":"edit_requirements","summary":"Requirements","description":"Operational requirements and their targets. action: add, update, delete, add_target, update_target, delete_target. add and update accept level (a profile level key), task and risk. add_target places a target at x_m, y_m, links it to the requirement, and accepts label and target_type. update_target accepts target_id, label, x_m, y_m, height_m, width_m, facing (towards-camera) or facing_deg. delete_target removes the target.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"action":{"type":"string"},"confirm":{"type":"boolean"}},"required":["project_id","base_version","action"],"additionalProperties":true}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/edit_access":{"post":{"operationId":"edit_access","summary":"Access control","description":"Controlled doors, controllers, groups, schedules and access levels. action: add_door, update_door, delete_door, add_controller, add_group, add_schedule, set_level. add_door uses opening_id or x_m and y_m. Door fields, on add or update: label, lock_type, fail_mode, reader_in, reader_out, rex, door_type, contact, break_glass, escape_route, mechanical_egress, controller_id, security_level. add_controller and add_group accept label. set_level uses group_id, door_id and schedule_id.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"action":{"type":"string"},"confirm":{"type":"boolean"}},"required":["project_id","base_version","action"],"additionalProperties":true}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/edit_intruder":{"post":{"operationId":"edit_intruder","summary":"Intruder alarm","description":"Intruder detection. action: init, set, add_area, add_zone, add_device, update, delete. set accepts grade (1-4), premises (domestic or commercial) and standby_h. add_area, add_zone and add_device accept label. add_zone needs area_id. add_device needs kind (see describe_capabilities detectors), x_m, y_m and optional zone_id. update accepts label (or patch) and delete needs id and list (areas, zones, devices, spaces, hazards, routes).","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"action":{"type":"string"},"confirm":{"type":"boolean"}},"required":["project_id","base_version","action"],"additionalProperties":true}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/edit_services":{"post":{"operationId":"edit_services","summary":"Cables and network","description":"Devices and cables for power, network and storage. action: add_device, update_device, delete_device, add_cable, update_cable, delete_cable, add_penetration, move_penetration, delete_penetration. add_device needs kind (switch, nvr, psu, and the other device kinds) and accepts label. update_device accepts label and patch. add_cable needs type_id (default cat6-uutp), from and to as {kind: camera|device, id}, and accepts label. With no waypoints the router draws the orthogonal tray. Containment defaults to a 3 m tray (or the ceiling, when the floor is lower than 3 m); containment_height_m overrides it. Do not leave an 8 m roof as the tray height. update_cable renames a cable and accepts external_route true or false (only an explicit external route may leave the building). add_penetration needs x_m and y_m (snapped to the nearest wall) or wall_id and offset_m. move_penetration needs id and offset_m. delete_penetration needs id.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"action":{"type":"string"},"confirm":{"type":"boolean"}},"required":["project_id","base_version","action"],"additionalProperties":true}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/edit_hvm":{"post":{"operationId":"edit_hvm","summary":"Hostile vehicles","description":"Indicative hostile-vehicle lines. action: add_line (points of the barrier line, optional vehicles), add_entry (x_m, y_m, speed_kmh). Read the result with read_calculations kind hvm.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"action":{"type":"string"},"confirm":{"type":"boolean"}},"required":["project_id","base_version","action"],"additionalProperties":true}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/edit_offshore":{"post":{"operationId":"edit_offshore","summary":"Offshore","description":"Platform, deck and hazardous zones. action: set_platform (heading_deg), set_deck (deck_type plate, grating or mixed), add_zone (points, zone), delete_zone, add_risk.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"action":{"type":"string"},"confirm":{"type":"boolean"}},"required":["project_id","base_version","action"],"additionalProperties":true}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/edit_monitor":{"post":{"operationId":"edit_monitor","summary":"Monitors","description":"Monitor wall and layouts. action: add_monitor (label, width_px, height_px), set_tile (monitor_id, index, camera_id), add_layout (label, camera_ids), delete_monitor, delete_layout.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"action":{"type":"string"},"confirm":{"type":"boolean"}},"required":["project_id","base_version","action"],"additionalProperties":true}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/edit_proposal":{"post":{"operationId":"edit_proposal","summary":"Proposal","description":"The design proposal and budget estimate. action: init, update (client_name, introduction, reference), add_line (kind labour, design-fee or other), delete. Prices are only values you enter. The tool does not invent a price.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"action":{"type":"string"},"confirm":{"type":"boolean"}},"required":["project_id","base_version","action"],"additionalProperties":true}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/edit_project":{"post":{"operationId":"edit_project","summary":"Project settings","description":"Project name, number, site, customer, company and author. action: set (name, number, site_address, customer_name, customer_contact, customer_address, company_name, company_reg_no, author) or trash. company_name and author are stored only when you set them; a blank value clears them so the export uses the current workspace and your display name. Setting company_name without company_reg_no clears the registration number. The built-in company is not stored. An unknown field is rejected and nothing is saved. trash requires confirm: true and moves the project to the trash. It does not purge the file.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"base_version":{"type":"string"},"action":{"type":"string"},"confirm":{"type":"boolean"}},"required":["project_id","base_version","action"],"additionalProperties":true}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/export_package":{"post":{"operationId":"export_package","summary":"Complete package","description":"The download to ask for. One ZIP: the PDF report (with 3D views, a simulated view of every camera, and the monitor wall), the DXF set, the IFC model (model.ifc), the spreadsheet, the proposal (Word and PDF), the .msdz project, and the 3D, camera and monitor PNG files, plus a manifest. Prefer this over the separate export tools.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}},"/tools/export_deliverable":{"post":{"operationId":"export_deliverable","summary":"Export a deliverable","description":"Download one deliverable. Prefer export_package for a full set. kind: proposal_pdf, proposal_docx, intruder_plan, intruder_schematic, sea, assurance. Plan PDF, DXF, spreadsheet and .msdz stay on export_pdf, export_dxf, export_xlsx and export_project. A draft notice is added to the design report; the proposal states it is not a quotation.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"},"kind":{"type":"string","enum":["proposal_pdf","proposal_docx","intruder_plan","intruder_schematic","sea","assurance"]},"floor_id":{"type":"string"}},"required":["project_id","kind"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool result. Calculated results include draft: true."},"403":{"description":"Scope, role, or agents switched off."},"409":{"description":"A newer project version exists."}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Workspace API key, shown once, prefix msd_live_."}}}}