Skip to main content
Glama

add_dialog_node

Adds a node to an existing dialog. Use parentType to add a PC reply, an NPC entry from a reply, or a root NPC entry to StartingList for quest-stage branching with condition scripts.

Instructions

Add a node to an existing dialog. If parentType is 'entry', adds a PC reply linked from that entry. If parentType is 'reply', adds an NPC entry linked from that reply. If parentType is 'dialog', adds a new NPC root entry to the StartingList (use for quest-stage branching with condition scripts). For 'dialog' mode, parentIndex controls insertion position: 0 inserts at the beginning (evaluated first), -1 or omit appends at the end (evaluated last).

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": {
      "dialog": "<dialog>",
      "parentIndex": "<parentIndex>",
      "parentType": "<parentType>",
      "text": "<text>"
    },
    "name": "add_dialog_node"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesDialog text for the new node
dialogYesDialog resref
scriptNoAction script resref (runs when node plays)
conditionNoCondition script on the link from parent
parentTypeYesType of parent: 'entry' adds PC reply, 'reply' adds NPC entry, 'dialog' adds NPC root entry to StartingList
parentIndexYesIndex of parent node in its list (EntryList or ReplyList). For parentType 'dialog': 0=insert at start, -1=append at end

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It adds real value by explaining link directionality and evaluation order for inserted root entries, but it omits whether changes persist automatically, what happens on an out-of-range parentIndex, and what the call returns or errors on.

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?

Four tight, front-loaded sentences ordered by mode, with the most consequential behavioral detail (insertion position and evaluation order) placed last. The parentType mapping is repeated from the schema, a small but real redundancy.

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 a six-parameter mutation tool with no annotations and no output schema, the description covers the two non-obvious parameters well and leaves text/dialog/script/condition to a fully documented schema. Gaps remain around return value, failure modes, and persistence, which matter for a write operation.

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 a baseline of 3 applies, and the description earns one more by adding semantics the schema does not spell out: what 'evaluated first' vs 'evaluated last' means in practice for dialog traversal, and which parameter combination suits quest-stage branching. The parentType restatement is largely redundant with the schema enum description.

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 and resource ('Add a node to an existing dialog') and then enumerates all three operating modes, each tied to a parentType value and the list the new node lands in (ReplyList, EntryList, StartingList). An agent can immediately tell this creates nodes rather than modifying them, distinguishing it from edit_dialog_node 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 per-mode guidance: 'entry' for PC replies, 'reply' for NPC entries, and 'dialog' explicitly for quest-stage branching with condition scripts. It never names an alternative tool or states prerequisites (e.g., that the target dialog must already exist), so the routing guidance 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.

Deploy Server

Other Tools