document_close
Close an open Fusion 360 document, optionally saving or discarding unsaved changes first, and return the newly active document.
Instructions
Call ONLY when the user explicitly asked to close the document.
A document with unsaved changes is not closed unless exactly one of
save_changes or discard_changes is true (INVALID_PARAMS otherwise, the
document stays open). save_changes needs a document that was saved before —
call document_save with a name first.
Returns {"closed": {"ref", "type", "name"}, "active": | null}.
Example: document_close(discard_changes=true).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document | No | Document ref from document_list; default: the active document | |
| save_changes | No | Save unsaved changes before closing (saved documents) | |
| discard_changes | No | Throw unsaved changes away; only if the user said so |