Open project (replaces the open session)
open_projectOpens a saved .3mf project with its plates, objects, presets, and colors, replacing the current project and resolving unsaved changes by save, discard, or fail.
Instructions
Open a saved .3mf project with its plates and settings, replacing the open one; load_model only adds a model's geometry.
As with File > Open Project, plates, objects, per-object and per-plate settings, slot presets and colours all come back. Use open_recent_project for an entry of File > Recent and browse_projects to find project files in a folder.
The two prompts OrcaSlicer would show are answered from the arguments, so nothing blocks. Unsaved preset overrides are dropped before the open because the project's config replaces them; the reply names those groups in discarded_changes. Call get_project first if you are unsure whether the user has unsaved work in the window, and pass if_unsaved='save' or 'discard' deliberately. A project that brings its own scripts, custom G-code or printer connection is refused (blocked_by_remote_api_policy, with the keys) unless the user allows those edits in OrcaSlicer's Preferences; nothing changes then. Needs fork v2.4.2-mcp.15 or later.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "open_project"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | A .3mf project on the OrcaSlicer host. | |
| presets | No | 'project' (default) selects the printer, print and filament presets stored in the project, as OrcaSlicer does. 'keep_current' opens the project and then selects the presets that were active before the call again (for names that still exist); the project's own config overrides are not kept in that mode. | project |
| if_unsaved | No | What to do when the current project has unsaved changes: 'fail' (default) refuses and changes nothing, 'save' writes it to its own path first (fails with no_project_path if it has none), 'discard' throws the changes away. | fail |