create_draft
Create an editable draft in the OpenArx Portal instead of publishing immediately. Returns a draft_id and an edit_url the user can open to review/edit before publishing. Drafts are file-only: first call create_upload_url, PUT your ZIP/PDF, then pass the returned file_id as content_ref. No content review runs and nothing is indexed — this is Portal workflow state, not corpus knowledge (drafts do not appear in get_my_documents). Optionally bind the draft to an existing document's version chain with previous_document_id, or preview with dry_run. The response always echoes a would_save block so you can confirm the server understood your inputs (which metadata keys were recognized, the resolved file details, and the version binding) before anything is published. The returned edit_url lets a person open and edit the draft in Portal before publishing. An agent cannot change a draft's CONTENT: there is no tool for that, so if the content needs to change, create a new draft. Metadata is different — title, authors, license and the rest can be supplied or corrected at publish time through publish_draft.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Draft title | |
| format | Yes | Content format | |
| run_id | No | Optional. The active methodist run_id (as returned by the methodist diagnose / get_current_dose door). Pass it whenever you call this tool while working inside a run, so the call is attributed to that run for the §8 usage crosscheck — attribution is run-anchored, so it stays correct even if your access token refreshes mid-run. Must be YOUR run: a run_id owned by a different principal, or a non-existent run_id, is rejected. | |
| dry_run | No | Set true to validate inputs without creating the draft: runs the full validation pipeline (schema, previous_document_id ownership, content_ref magic-bytes), writes nothing to the Portal, does NOT consume the content_ref (a later real call with the same content_ref still succeeds), and returns the would_save echo with draft_id and edit_url null. Always free. | |
| metadata | No | Optional metadata block — same field set as submit_document (authors, abstract, license, funding, coi_statement, data_availability, related_identifiers, embargo_until, hubs, code_links, dataset_links, benchmark_links, doi, arxiv_id, source_url, arxiv_categories, …). Unrecognized keys are dropped; would_save.metadata echoes exactly the fields the server recognized — a key missing from that echo was a typo or unsupported. | |
| content_ref | No | file_id from create_upload_url + PUT. The uploaded ZIP/PDF becomes the draft content (required — drafts are file-only). | |
| previous_document_id | No | Optional. Core document ID of the version this draft revises. When set it must exist AND be owned by you; the draft is then bound to that document's concept (version chain). Omit for a standalone draft. |