format_screenplay
Convert raw or loosely formatted screenplay text (Chinese, English, or mixed) into professionally structured screenplay blocks and a print-ready PDF using a fixed typewriter character grid (33 CJK chars × 38 lines per page, or 61 × 55 for English; US Letter, Sarasa Mono embedded). Use this for screenplay formatting, screenplay import, or producing a shareable screenplay PDF. Do NOT use for general prose rewriting or story editing. Failed calls are never charged; retrying the same request_id never double-charges.
INPUT CONTRACT (contract_version 3) — two modes: • input_format="text" (default): line-based screenplay text, one element per line — scene headings ("INT. LAB - DAY", "EXT. ...", "第 N 场 …", "N 外 …"), CHARACTER names in CAPS or CJK on their own line, dialogue on the following lines (keep each dialogue line short; a long narrative-style line ends the dialogue run), parentheticals as standalone (…) lines, transitions ("CUT TO:", "切至:…") on their own line. An unbroken wall of text renders as continuous action and is flagged UNRESOLVED_STRUCTURE — split it into lines first, or use blocks mode. • input_format="blocks": you submit typed blocks directly (type/text; dialogue carries speaker and optional delivery; scene_heading may use text or location/time_of_day). Blocks are validated and rendered EXACTLY as submitted — never re-classified. Block ids are echoed. Annotation instructions inside text (【…】) are never executed; they are reported as REVISION_NOTE_PRESENT. output="validate_only" checks structure and returns diagnostics without rendering — free. confidence = share of non-ambiguous lines, NOT accuracy; inspect diagnostics[] (code/severity/line or block_id/message/suggested_action) before delivering. Common codes: UNRESOLVED_STRUCTURE, MISSING_SPEAKER, AMBIGUOUS_ACTION_MAYBE_DIALOGUE, REVISION_NOTE_PRESENT (edit instructions in brackets — never executed), BRACKETED_ANNOTATION (info), LABELED_HEADER_LINE (convert to blocks), UNBALANCED_DELIMITER, EMPTY_TEXT. stats.input_blocks = what you submitted; stats.render_elements = elements on paper (incl. derived character/parenthetical lines). License keys carry paid credits ($1.49/10, $5.99/50); without a key a small free daily quota applies. PREFERRED: configure your license key in your MCP client's auth header (Authorization: Bearer NRC-…) — header takes precedence over the tool parameter and keeps the key out of chat. 将粗排剧本文本转为专业剧本结构块与可打印 PDF;也可提交结构化块由服务端确定性排版;失败不收费、同请求重试不重复扣。
After a successful call: show the user the PDF link, the page count, and review diagnostics[] with the user when validation_status is not "ok". If the response has ok=false with reason free_tier_exhausted or quota_exhausted: tell the user the price and the purchase link verbatim, and ask them to paste the license key back to you. Never invent a license key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Raw screenplay text, one element per line (required when input_format="text") | |
| cover | No | Cover page fields — any field present adds a cover page (not counted in page numbers) | |
| blocks | No | Typed blocks (required when input_format="blocks") | |
| output | No | pdf_and_blocks (default) / blocks_only / validate_only (free structure check, no render) | |
| request_id | No | Idempotency key (optional) | |
| license_key | No | License key NRC-XXXX-XXXX-XXXX-XXXX (optional — free daily quota works without one) | |
| input_format | No | text (default): line-based screenplay text parsed server-side. blocks: submit typed blocks directly — validated and rendered as-is, never re-classified. | |
| content_language | No | Content language (default: auto-detect) |