Skip to main content
Glama

Set prompt

set_prompt

Replace the text of nodes of groups, as typing it in the app would: a generator's prompt, a text node's body, or a story element's stage body (the Story element node of a story element group, for that group's stage). @# tokens are checked (every token must cite something in the project); on a generator the reference edges follow the tokens, so a token you drop disconnects that input and a token you add connects it. One call takes up to 25 prompts, e.g. the panels of every shot of a scene; every prompt is checked before anything is written. Each prompt defaults to its group's default target (defaultNodeId in get_group: a shot's panel, the starred generator of a production group or the art direction, a story element's reference sheet or production reference generator, or in its moodboard its Story element node); nodeId picks another, e.g. {entityId}-story-element for a stage body. Read the current text and its references with get_group first. rewrote and updatedRole say which node was rewritten. A storyboard prompt (a shot's panel, a reference sheet or any node of a storyboard group) never cites the art direction (@#ad-text, @#ad-image), which is the production look: it is refused. The shot panel's prompt is managed by the app: a prompt you set there is kept as written (it no longer follows the shot's action, framing and camera) until you call again with restoreDefault: true. Story element mentions (@characters.slug, @places.slug, @objects.slug) and legacy @ref_storyboard_… handles are turned into live references. No images are generated and no credits are spent.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompts": "<prompts>",
      "projectId": "<projectId>"
    },
    "name": "set_prompt"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptsYesOne entry per node to rewrite (max 25), e.g. the panels of every shot of a scene. Each node can appear once.
projectIdYesScreenWeaver project id (from list_projects).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / prompts / items / properties / target / properties / kind / description
      Previous value: -"shot (a shot's storyboard or production group), story_element (a character, place or object's moodboard, storyboard or production group), scene (a scene's own Production group, beside its shots) or art_direction (the project's art direction)."New value: +"shot (a shot's storyboard group, or its production group, which is empty: shots are produced in their scene's group), story_element (a character, place or object's moodboard, storyboard or production group), scene (a scene's own Production group, beside its shots) or art_direction (the project's art direction)."
  2. Changed5 schema fields changed
    • changedInput schema / properties / prompts / items / properties / target / description
      Previous value: -"The group, e.g. { kind: \"shot\", id: shotId } for a shot's panel group, { kind: \"story_element\", id: entityId } for a reference sheet, { kind: \"art_direction\" }."New value: +"The group, e.g. { kind: \"shot\", id: shotId } for a shot's panel group, { kind: \"story_element\", id: entityId } for a reference sheet, { kind: \"scene\", id: sceneId } for a scene's Production group, { kind: \"art_direction\" }."
    • changedInput schema / properties / prompts / items / properties / target / properties / group / description
      Previous value: -"Which group. A shot has storyboard (its panel) and production; a story element has moodboard, storyboard (its reference sheet) and production. Defaults to storyboard. Ignored for the art direction."New value: +"Which group. A shot has storyboard (its panel) and production; a story element has moodboard, storyboard (its reference sheet) and production; a scene has production only. Defaults to storyboard (production for a scene). Ignored for the art direction."
    • changedInput schema / properties / prompts / items / properties / target / properties / id / description
      Previous value: -"shotId (list_shots) for a shot, entityId (list_entities) for a story element. Omit for the art direction."New value: +"shotId (list_shots) for a shot, entityId (list_entities) for a story element, sceneId (get_project_outline) for a scene. Omit for the art direction."
    • changedInput schema / properties / prompts / items / properties / target / properties / kind / description
      Previous value: -"shot (a shot's storyboard or production group), story_element (a character, place or object's moodboard, storyboard or production group) or art_direction (the project's art direction)."New value: +"shot (a shot's storyboard or production group), story_element (a character, place or object's moodboard, storyboard or production group), scene (a scene's own Production group, beside its shots) or art_direction (the project's art direction)."
    • changedInput schema / properties / prompts / items / properties / target / properties / kind / enum
      Previous value: -[
      -  "shot",
      -  "story_element",
      -  "art_direction"
      -]New value: +[
      +  "shot",
      +  "story_element",
      +  "scene",
      +  "art_direction"
      +]
  3. Changed2 schema fields changed
    • changedInput schema / properties / prompts / items / properties / nodeId / description
      Previous value: -"A node of the group from get_group (nodeId): a generator, a text node or the Story element node. Omit for the group's default target (defaultNodeId in get_group): a shot's panel, the starred generator of a production group or the art direction, a story element's Story element node."New value: +"A node of the group from get_group (nodeId): a generator, a text node or the Story element node. Omit for the group's default target (defaultNodeId in get_group): a shot's panel, the starred generator of a production group or the art direction, a story element's reference sheet generator (storyboard) or production reference generator (production), and a story element's Story element node in its moodboard. Name the Story element node ({entityId}-story-element) only to change what every shot citing the element receives."
    • changedInput schema / properties / prompts / items / properties / promptText / description
      Previous value: -"The whole new text: a generator's prompt, a text node's body, or the Story element's body for this group's stage. Cite nodes with @#nodeId tokens (from get_group or add_reference_images), story elements with their referenceHandle (list_entities), the art direction with @#ad-text / @#ad-image. Every token must resolve. Keep the tokens of images you want kept."New value: +"The whole new text: a generator's prompt, a text node's body, or the Story element's body for this group's stage. Cite nodes with @#nodeId tokens (from get_group or add_reference_images), story elements with their referenceHandle (list_entities), the art direction with @#ad-text / @#ad-image (production and art direction prompts only, never a storyboard prompt). Every token must resolve. Keep the tokens of images you want kept."
  4. Changed6 schema fields changed
    • removedInput schema / properties / nodeId
      Removed value: -{
      -  "description": "A node of the group from get_group (nodeId): a generator, a text node or the Story element node. Omit for the group's default target (defaultNodeId in get_group): a shot's panel, the starred generator of a production group or the art direction, a story element's Story element node.",
      -  "maxLength": 200,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • removedInput schema / properties / promptText
      Removed value: -{
      -  "description": "The whole new text: a generator's prompt, a text node's body, or the Story element's body for this group's stage. Cite nodes with @#nodeId tokens (from get_group), story elements with their referenceHandle (list_entities), the art direction with @#ad-text / @#ad-image. Every token must resolve. Keep the tokens of images you want kept.",
      -  "maxLength": 20000,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • addedInput schema / properties / prompts
      Added value: +{
      +  "description": "One entry per node to rewrite (max 25), e.g. the panels of every shot of a scene. Each node can appear once.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "nodeId": {
      +        "description": "A node of the group from get_group (nodeId): a generator, a text node or the Story element node. Omit for the group's default target (defaultNodeId in get_group): a shot's panel, the starred generator of a production group or the art direction, a story element's Story element node.",
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "promptText": {
      +        "description": "The whole new text: a generator's prompt, a text node's body, or the Story element's body for this group's stage. Cite nodes with @#nodeId tokens (from get_group or add_reference_images), story elements with their referenceHandle (list_entities), the art direction with @#ad-text / @#ad-image. Every token must resolve. Keep the tokens of images you want kept.",
      +        "maxLength": 20000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "restoreDefault": {
      +        "description": "Shot panel only: put the panel prompt back on the app's template (it follows the shot's action, framing and camera again). Pass instead of promptText.",
      +        "type": "boolean"
      +      },
      +      "target": {
      +        "additionalProperties": false,
      +        "description": "The group, e.g. { kind: \"shot\", id: shotId } for a shot's panel group, { kind: \"story_element\", id: entityId } for a reference sheet, { kind: \"art_direction\" }.",
      +        "properties": {
      +          "group": {
      +            "description": "Which group. A shot has storyboard (its panel) and production; a story element has moodboard, storyboard (its reference sheet) and production. Defaults to storyboard. Ignored for the art direction.",
      +            "enum": [
      +              "moodboard",
      +              "storyboard",
      +              "production"
      +            ],
      +            "type": "string"
      +          },
      +          "id": {
      +            "description": "shotId (list_shots) for a shot, entityId (list_entities) for a story element. Omit for the art direction.",
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "kind": {
      +            "description": "shot (a shot's storyboard or production group), story_element (a character, place or object's moodboard, storyboard or production group) or art_direction (the project's art direction).",
      +            "enum": [
      +              "shot",
      +              "story_element",
      +              "art_direction"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "kind"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "target"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 25,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • removedInput schema / properties / restoreDefault
      Removed value: -{
      -  "description": "Shot panel only: put the panel prompt back on the app's template (it follows the shot's action, framing and camera again). Pass instead of promptText.",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / target
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "The group, e.g. { kind: \"shot\", id: shotId } for a shot's panel group, { kind: \"story_element\", id: entityId } for a reference sheet, { kind: \"art_direction\" }.",
      -  "properties": {
      -    "group": {
      -      "description": "Which group. A shot has storyboard (its panel) and production; a story element has moodboard, storyboard (its reference sheet) and production. Defaults to storyboard. Ignored for the art direction.",
      -      "enum": [
      -        "moodboard",
      -        "storyboard",
      -        "production"
      -      ],
      -      "type": "string"
      -    },
      -    "id": {
      -      "description": "shotId (list_shots) for a shot, entityId (list_entities) for a story element. Omit for the art direction.",
      -      "maxLength": 128,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "kind": {
      -      "description": "shot (a shot's storyboard or production group), story_element (a character, place or object's moodboard, storyboard or production group) or art_direction (the project's art direction).",
      -      "enum": [
      -        "shot",
      -        "story_element",
      -        "art_direction"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "kind"
      -  ],
      -  "type": "object"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "target",
      -  "projectId"
      -]New value: +[
      +  "prompts",
      +  "projectId"
      +]
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare a non-read-only, non-open-world, non-destructive update. The description adds substantial behavior: token validation and reference-edge rewiring, all-or-nothing checking before writes, default target resolution, the storyboard/art-direction refusal rule, the app-managed shot panel and restoreDefault, mention-to-reference conversion, and no image/credit side effects.

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?

The first sentence is front-loaded and the rest is organized around constraints. It is dense and parenthetical, and some target/default detail duplicates the schema, but the length is largely justified by the tool's multi-target and token behavior.

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?

For a complex multi-target mutation with no output schema, the description covers prerequisites, batch limits, atomicity, target defaults, token mechanics, and the app-managed panel exception. It also names the return fields ('rewrote' and 'updatedRole'), making it self-contained enough to call correctly.

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% and the nested properties already document nodeId, target, promptText, and restoreDefault. The description still adds useful semantics: token drops disconnect inputs and token additions connect them, batched prompts are checked atomically, and defaults come from get_group's defaultNodeId.

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?

The opening sentence names a specific verb ('Replace') and resource ('text of nodes of groups'), and enumerates the three body types (generator prompt, text node body, story element stage body), so an agent knows exactly what is being changed. It also scopes the tool away from image generation and credit spending.

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?

It gives prerequisites ('Read the current text and its references with get_group first'), batch guidance ('up to 25 prompts'), and exclusions (storyboard prompts cannot cite art direction; shot panel is app-managed unless restoreDefault). It does not explicitly compare against sibling tools such as set_shot_panel, so the when-to-use framing is strong but not exhaustive.

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.