Skip to main content
Glama

Narracore Screenplay Formatter

Format screenplay (blocks + PDF)

format_screenplay

Convert raw or loosely formatted screenplay text (Chinese, English, or mixed — including Japanese broadcast-drama format and Chinese colon-style dialogue scripts) into professionally structured screenplay blocks and a print-ready PDF on a fixed typewriter character grid identical to narracore.cn. Use it for screenplay formatting, import, or producing a shareable screenplay PDF — NOT for general prose rewriting or story editing.

INPUT (contract_version 3) — two modes: • input_format="text" (default): line-based screenplay text, one element per line — scene headings ("INT. LAB - DAY", "第 N 场 …"), CHARACTER names in CAPS or CJK on their own line, short dialogue lines after them, standalone (…) parentheticals, standalone transitions ("CUT TO:", "切至:…"). Inline dialogue 名前「セリフ」 and 人名:台词 is parsed natively. An unbroken wall of text renders as continuous action and is flagged UNRESOLVED_STRUCTURE. • input_format="blocks": typed blocks validated and rendered EXACTLY as submitted, never re-classified; ids echoed. CHAINING: to run other tools on this screenplay, pass back the BLOCKS you received — not the plain text (it parses differently). The same screenplay is charged once per 24h across analyze/diagnose/convert/video-prompt tools; check_video_prompts is free. • output="validate_only": structure check + diagnostics only, free.

Before delivering: read diagnostics[] (code/severity/line or block_id/message/suggested_action) with the user; confidence = share of non-ambiguous lines, NOT accuracy.

Billing: one credit = one screenplay for 24h across the screenplay tools (or one film analysis / one story project). Free tier: one credit per day per visitor, no key. Failed calls are never charged; the same request_id never double-charges. On free_tier_exhausted or quota_exhausted: relay the price and purchase link from the response verbatim; never invent a license key.

Full parameter manual (cover/header/footer, examples): https://narracore.app/llms.txt

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoRaw screenplay text, one element per line (required when input_format="text")
coverNoCover page fields — any field present adds a cover page (not counted in page numbers); date defaults to today (UTC) when omitted
blocksNoTyped blocks (required when input_format="blocks")
footerNoExplicit footer (centered below the text box); same value resolution as header
headerNoExplicit running header (overrides the default page-number line): field values come from cover; missing fields are skipped; page_number renders N/M at the right edge
outputNopdf_and_blocks (default) / blocks_only / validate_only (free structure check, no render)
includeNoReceipt body shape (default both): blocks=typed blocks only, plain_text=formatted text only — halves the receipt for large screenplays; validate_only always echoes blocks
request_idNoIdempotency key (optional)
license_keyNoLicense key NRC-XXXX-XXXX-XXXX-XXXX (optional — free daily quota works without one)
input_formatNotext (default): line-based screenplay text parsed server-side. blocks: submit typed blocks directly — validated and rendered as-is, never re-classified.
content_languageNoContent language (default: auto-detect)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
stateNo
statsNo
blocksNo
reasonNo
creditsNo
messageNo
pdf_urlNo
pdf_metaNo
recoveryNo
warningsNo
conflictsNo
next_stepNo
pdf_bytesNo
confidenceNo
plain_textNo
request_idNo
diagnosticsNo
next_actionsNo
contract_versionNo
validation_statusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / include
      Added value: +{
      +  "description": "Receipt body shape (default both): blocks=typed blocks only, plain_text=formatted text only — halves the receipt for large screenplays; validate_only always echoes blocks",
      +  "enum": [
      +    "blocks",
      +    "plain_text",
      +    "both"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "blocks": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "delivery": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "location": {
      +            "type": "string"
      +          },
      +          "scene_number": {
      +            "type": "string"
      +          },
      +          "speaker": {
      +            "type": "string"
      +          },
      +          "text": {
      +            "type": "string"
      +          },
      +          "time_of_day": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "confidence": {
      +      "type": "number"
      +    },
      +    "conflicts": {},
      +    "contract_version": {
      +      "type": "string"
      +    },
      +    "credits": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "bundled": {
      +          "type": "boolean"
      +        },
      +        "charged": {
      +          "type": "number"
      +        },
      +        "free_tier_used": {
      +          "type": "boolean"
      +        },
      +        "note": {
      +          "type": "string"
      +        },
      +        "remaining": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "charged",
      +        "remaining"
      +      ],
      +      "type": "object"
      +    },
      +    "diagnostics": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "block_id": {
      +            "type": "string"
      +          },
      +          "code": {
      +            "type": "string"
      +          },
      +          "line": {
      +            "type": "number"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "severity": {
      +            "type": "string"
      +          },
      +          "suggested_action": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "severity",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "next_actions": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "billing": {
      +            "enum": [
      +              "free",
      +              "bundled",
      +              "charged"
      +            ],
      +            "type": "string"
      +          },
      +          "purpose": {
      +            "type": "string"
      +          },
      +          "requires": {
      +            "type": "string"
      +          },
      +          "reuse_fields": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "tool": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "tool",
      +          "purpose",
      +          "requires",
      +          "billing",
      +          "reuse_fields"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "next_step": {
      +      "type": "string"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "pdf_bytes": {
      +      "type": "number"
      +    },
      +    "pdf_meta": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "bytes": {
      +          "type": "number"
      +        },
      +        "expires_at_utc": {
      +          "type": "string"
      +        },
      +        "filename": {
      +          "type": "string"
      +        },
      +        "mime_type": {
      +          "type": "string"
      +        },
      +        "pages": {
      +          "type": "number"
      +        },
      +        "url": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "filename",
      +        "mime_type",
      +        "bytes",
      +        "expires_at_utc",
      +        "pages",
      +        "url"
      +      ],
      +      "type": "object"
      +    },
      +    "pdf_url": {
      +      "type": "string"
      +    },
      +    "plain_text": {
      +      "type": "string"
      +    },
      +    "reason": {
      +      "type": "string"
      +    },
      +    "recovery": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "action": {
      +          "type": "string"
      +        },
      +        "field_path": {
      +          "type": "string"
      +        },
      +        "keep_request_id": {
      +          "type": "boolean"
      +        },
      +        "note": {
      +          "type": "string"
      +        },
      +        "resets_at_utc": {
      +          "type": "string"
      +        },
      +        "retry_after_ms": {
      +          "type": "number"
      +        },
      +        "retryable": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "action",
      +        "retryable",
      +        "keep_request_id"
      +      ],
      +      "type": "object"
      +    },
      +    "request_id": {
      +      "type": "string"
      +    },
      +    "state": {},
      +    "stats": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "chars": {
      +          "type": "number"
      +        },
      +        "content_language": {
      +          "type": "string"
      +        },
      +        "input_blocks": {
      +          "type": "number"
      +        },
      +        "page_starts": {
      +          "items": {
      +            "type": "number"
      +          },
      +          "type": "array"
      +        },
      +        "pages": {
      +          "type": "number"
      +        },
      +        "render_elements": {
      +          "type": "number"
      +        },
      +        "scenes": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "input_blocks",
      +        "render_elements",
      +        "scenes",
      +        "pages",
      +        "page_starts",
      +        "chars",
      +        "content_language"
      +      ],
      +      "type": "object"
      +    },
      +    "validation_status": {
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  2. Changed6 schema fields changed
    • addedInput schema / properties / blocks / items / properties / text / maxLength
      Added value: +200000
    • addedInput schema / properties / cover / additionalProperties
      Added value: +false
    • addedInput schema / properties / cover / properties / author / maxLength
      Added value: +2000
    • addedInput schema / properties / cover / properties / date / maxLength
      Added value: +64
    • addedInput schema / properties / cover / properties / title / maxLength
      Added value: +2000
    • addedInput schema / properties / cover / properties / version / maxLength
      Added value: +64
  3. Changed3 schema fields changed
    • changedInput schema / properties / cover / description
      Previous value: -"Cover page fields — any field present adds a cover page (not counted in page numbers)"New value: +"Cover page fields — any field present adds a cover page (not counted in page numbers); date defaults to today (UTC) when omitted"
    • addedInput schema / properties / footer
      Added value: +{
      +  "description": "Explicit footer (centered below the text box); same value resolution as header",
      +  "properties": {
      +    "items": {
      +      "items": {
      +        "enum": [
      +          "title",
      +          "author",
      +          "date",
      +          "version",
      +          "page_number"
      +        ],
      +        "type": "string"
      +      },
      +      "maxItems": 5,
      +      "minItems": 1,
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "items"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / header
      Added value: +{
      +  "description": "Explicit running header (overrides the default page-number line): field values come from cover; missing fields are skipped; page_number renders N/M at the right edge",
      +  "properties": {
      +    "items": {
      +      "items": {
      +        "enum": [
      +          "title",
      +          "author",
      +          "date",
      +          "version",
      +          "page_number"
      +        ],
      +        "type": "string"
      +      },
      +      "maxItems": 5,
      +      "minItems": 1,
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "items"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnlyHint=false, destructiveHint=false, openWorldHint=false, and idempotentHint=false, so the description usefully adds billing rules (one credit per screenplay per 24h, failed calls never charged, request_id never double-charges), the free-tier behavior, and the diagnostics/confidence semantics. However, the material billing and quota disclosure is largely a policy/UX layer rather than operational behavior of the formatting itself, and the idempotency claim is only implicitly reconciled with idempotentHint=false.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is long but front-loaded: the opening sentence carries purpose, scope, and exclusions, then it is chunked into INPUT, chaining, pre-delivery, and billing sections. Some lines (credit/pricing detail) approach promotional copy, but each block still serves a decision the caller must make.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter, nested-object tool with an output schema, the definition covers both input modes, chaining, free paths, and pre-delivery diagnostics, and it delegates full parameter detail to the llms.txt manual. That is close to complete; the small remaining gap is that the header/footer/cover parameters are only pointed at rather than summarized, which is acceptable with 100% schema coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains that blocks are 'validated and rendered EXACTLY as submitted, never re-classified', describes the line grammar for text mode, and notes UNRESOLVED_STRUCTURE for unbroken text. That clarifies when each mode should be chosen and what the parser expects.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Convert ... screenplay text ... into ... serializer blocks and a print-ready PDF') with the target grid and languages spelled out, and it explicitly excludes adjacent work ('NOT for general prose rewriting or story editing'). An agent can distinguish it from analyze_screenplay, diagnose_scenes, and convert_fountain without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use (screenplay formatting, import, PDF production), mode selection (text vs blocks vs validate_only), and routing guidance to siblings ('to run other tools on this screenplay, pass back the BLOCKS you received — not the plain text'). It also states validate_only is free and check_video_prompts is free, so the agent knows the cost-free paths.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.