Skip to main content
Glama

ScreenWeaver

Import script file

import_script
Destructive

Import a Final Draft (.fdx) file, a WriterDuet (.json) file, or Fountain / screenplay-formatted plain text (a pasted script) into the project's script. Pass the full text as content, or the textId extract_file_text returned for a PDF or page images. The format is detected from the content; pass format only to force it ("fountain" forces the plain-text importer). Plain text counts as a screenplay when it has INT./EXT. scene headings or uppercase character cues with dialogue below them.

Call it with dryRun: true first. Nothing is written. The preview lists the scenes, element counts, where the content goes (and whether a Final Draft title page is kept), and for each character and place name in the file the entity it links to or "create", with near-miss candidates (a similar existing name, for example TOBY and TOBIAS). When the preview has names to create or near misses, show the user those links and ask. Then import for real with entityMap, mapping each confirmed name to its entityId (from the preview or list_entities). Names left out of entityMap are linked by name or created.

entityMap keys are names as the file writes them; a cue extension is ignored ("MARA (O.S.)" is the key "MARA"). Only characters and places can be mapped. A mapped cue line takes the entity's name and keeps its extension, and a mapped scene heading takes the place's name.

The file is parsed by the app's own importers: scene headings, action, characters, dialogue, parentheticals, transitions and structure keep their types. CHARACTER lines and scene headings are linked to the project's characters and places by name ("MARA (O.S.)" and "MARA (CONT'D)" link to MARA and keep "(O.S.)" / "(CONT'D)" on the cue line), and missing ones are created as story elements (returned in createdEntities). The pre-import script is saved to version History so the user can undo it.

insertPosition: "end" (default) appends after the current script; "start" puts the file first, after the script's title block (its first EPISODE and the OUTLINE lines under it); "replace" replaces the whole script and requires confirmReplace: true on the real call (a dryRun does not), so ask the user before replacing their writing. A Final Draft or Fountain title page becomes the script's title block only on a replace or an empty script; otherwise it is left out.

A PDF, a scan or photos of pages: call extract_file_text first, then import its text here with textId. Never retype a long script with edit_script. For text that is not screenplay-formatted (notes, prose), do not use this tool: write it with edit_script, one element per scene heading, action paragraph, character cue, parenthetical and dialogue line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dryRunNoPreview only: parse and plan, write nothing, and return the links the import would make.
formatNoForce the importer. Detected from content when omitted.
textIdNotextId from extract_file_text: imports that text instead of content.
contentNoThe file's full text: FDX XML, WriterDuet JSON, or Fountain / screenplay-formatted plain text. Pass this or textId.
entityMapNoForce links: { "<name in the file>": "<entityId of an existing character or place>" }. A cue extension in the key is ignored.
projectIdYesScreenWeaver project id (from list_projects).
confirmReplaceNoMust be true when insertPosition is "replace" (not needed with dryRun).
insertPositionNoWhere the imported script goes. Default end.end

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.