Skip to main content
Glama

Narracore Screenplay Formatter

Screenplay statistics

analyze_screenplay

Deterministic screenplay statistics from the Narracore analyzer (analyzer_version 1.0, same rules as narracore.cn): a scene list with structured scene headings (scene number / location / time of day / INT-EXT parsed from each heading), per-scene word count, dialogue ratio and action density, plus a character table (cue count, scenes present, dialogue lines, dialogue chars, share of dialogue). Accepts the same inputs as format_screenplay (input_format="text" or "blocks") — pass the SAME screenplay to both tools: one credit covers one screenplay for 24 hours across the screenplay tools (format / analyze / diagnose / convert / video prompts). When chaining tools, pass back the blocks you received (structured), not the formatted plain text. Failed calls are never charged; retrying the same request_id never double-charges. 剧本确定性统计:场景清单(结构化场景头)、逐场字数/对白占比/动作密度、角色戏份表;同一份剧本 24 小时内多工具只扣一次。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoRaw screenplay text (required when input_format="text")
blocksNoTyped blocks (required when input_format="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. blocks: typed blocks (e.g. the blocks returned by format_screenplay).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
toolNo
stateNo
reasonNo
scenesNo
totalsNo
creditsNo
messageNo
recoveryNo
conflictsNo
next_stepNo
charactersNo
request_idNo
diagnosticsNo
next_actionsNo
analyzer_versionNo
contract_versionNo
validation_statusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "analyzer_version": {
      +      "type": "string"
      +    },
      +    "characters": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "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"
      +    },
      +    "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"
      +    },
      +    "scenes": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "state": {},
      +    "tool": {
      +      "const": "analyze_screenplay",
      +      "type": "string"
      +    },
      +    "totals": {},
      +    "validation_status": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / blocks / items / properties / text / maxLength
      Added value: +200000
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the billing model (one credit covers one screenplay for 24 hours across the screenplay tool family), failure/retry semantics (failed calls never charged; same request_id never double-charges), and determinism guarantees (analyzer_version 1.0, same rules as narracore.cn). None of this is recoverable from the structured fields.

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?

Front-loads purpose before usage and billing, and each sentence carries information. It runs long and the trailing Chinese restatement duplicates the preceding content, which slightly dilutes density but serves a bilingual audience.

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

Completeness5/5

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

Output schema exists, so return values need not be enumerated, yet the description still previews the payload (scene headings fields, character metrics) and fully covers input coupling, billing, and retry behavior. Nothing an agent needs to invoke this correctly is missing.

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 description coverage is 100%, so the baseline is 3, but the description adds real meaning on top: input_format="text" vs "blocks" and, critically, that chained calls should pass back the structured blocks rather than the formatted text. That is actionable guidance the schema does not supply.

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 (deterministic statistics) on a specific resource (screenplay) and enumerates the exact outputs: scene list with parsed headings, per-scene word count/dialogue ratio/action density, and a character table. It also anchors the tool against siblings by naming format_screenplay and the shared analyzer rules, so an agent can distinguish it without opening any schema.

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

Usage Guidelines4/5

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

Gives concrete usage context: accepts the same inputs as format_screenplay, pass the SAME screenplay to both tools, and when chaining, pass back the structured blocks rather than formatted plain text. It does not explicitly say when to prefer this over diagnose_scenes or compile_film_breakdown, so the when-not guidance is partial.

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.