Skip to main content
Glama

Set Node Logic

clipform_set_logic
DestructiveIdempotent

Set where one or more nodes go next. Pass multiple nodes in one call instead of separate tool calls.

  • Linear: one rule with only target_node_id (A to B to C).

  • By answer: on a single-select choice node with branching on, give one rule per answer with option_content set to the option's text, plus an optional default rule without option_content. Every answer needs a route: one with no rule of its own and no default has nowhere to go, and publishing fails. Different answers can go to different nodes or end screens. A multi-select choice has one route out, so answer rules are refused there.

Turning branching on: set config.choice.enable_branching: true in clipform_create_form, or with clipform_update_node. update_node replaces the whole choice object, so send the node's full current choice config from clipform_get_form with enable_branching added - a choice object with only enable_branching drops quiz settings such as record_scores.

A second ending that only some answers reach is added with clipform_add_node and unlinked: true.

A call replaces that node's routing entirely - it does not merge with any prior target. A default rule covers the answers that exist now; an answer added later needs its own rule. clipform_get_form shows each answer's route afterwards, and flags any answer with no route.

Example: nodes: [ { node_id: "q1-id", rules: [{ target_node_id: "q2-id" }] }, { node_id: "country-id", rules: [ { option_content: "United Kingdom", target_node_id: "video-id" }, { option_content: "Somewhere else", target_node_id: "sorry-end-id" } ] } ]

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": {
      "form_id": "<form_id>",
      "nodes": "<nodes>",
      "context": "<context>"
    },
    "name": "clipform_set_logic"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodesYesOne or more nodes to set logic on
contextYesDescribe the user's underlying goal in one sentence - not the tool you're calling.
form_idYesThe form UUID (returned by clipform_create_form, not the short share_id from the URL)

Output Schema

NameRequiredDescriptionDefault
resultsYesOne result per node, in order

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / nodes / items / properties / rules / description
      Previous value: -"Exactly one rule: the single node this node routes to"New value: +"One rule without option_content for a single next node, or one rule per answer (option_content) plus an optional default rule"
    • addedInput schema / properties / nodes / items / properties / rules / items / properties / option_content
      Added value: +{
      +  "description": "Route only this answer: the option's text exactly as clipform_get_form lists it, without the (id: ...) suffix. Omit for the node's default route, which covers every current answer without a rule of its own.",
      +  "type": "string"
      +}
    • changedInput schema / properties / nodes / items / properties / rules / items / properties / target_node_id / description
      Previous value: -"The node ID this node routes to"New value: +"The node ID this route goes to: any other node, including an end screen"
    • changedInput schema / properties / nodes / items / properties / rules / maxItems
      Previous value: -1New value: +13
  2. Changed3 schema fields changed
    • addedInput schema / properties / form_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / nodes / items / additionalProperties
      Removed value: -false
    • removedInput schema / properties / nodes / items / properties / rules / items / additionalProperties
      Removed value: -false
  3. Changed3 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Describe the user's underlying goal in one sentence - not the tool you're calling.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "form_id",
      -  "nodes"
      -]New value: +[
      +  "form_id",
      +  "nodes",
      +  "context"
      +]
  4. Changed5 schema fields changed
    • changedInput schema / properties / nodes / items / properties / node_id / description
      Previous value: -"The node ID to set logic on"New value: +"The node ID to set routing on"
    • changedInput schema / properties / nodes / items / properties / rules / description
      Previous value: -"Branching rules. Each maps an option or default to a target node."New value: +"Exactly one rule: the single node this node routes to"
    • removedInput schema / properties / nodes / items / properties / rules / items / properties / option_content
      Removed value: -{
      -  "description": "The option text to match. Omit for a default rule (applies to all unmatched options).",
      -  "type": "string"
      -}
    • changedInput schema / properties / nodes / items / properties / rules / items / properties / target_node_id / description
      Previous value: -"The node ID to jump to when this rule matches"New value: +"The node ID this node routes to"
    • addedInput schema / properties / nodes / items / properties / rules / maxItems
      Added value: +1
  5. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "results": {
      +      "description": "One result per node, in order",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "error": {
      +            "type": "string"
      +          },
      +          "node_id": {
      +            "type": "string"
      +          },
      +          "ok": {
      +            "type": "boolean"
      +          },
      +          "rules_count": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "node_id",
      +          "ok"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "results"
      +  ],
      +  "type": "object"
      +}
  6. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true, and the description supplies the reason: "A call replaces that node's routing entirely - it does not merge with any prior target." It further discloses a hard failure mode (an unrouted answer makes publishing fail) and a temporal caveat that a default rule only covers answers existing at call time, which is exactly the kind of consequence structured fields cannot convey.

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-loaded with the one-line purpose, then bulleted routing modes and a compact JSON example, so an agent can scan for its case quickly. It is on the long side for a three-parameter tool, and a few lines (the get_form verification note) sit at the tail where they are less prominent, but no sentence is filler.

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?

Given a destructive-write tool with rich annotations, a 100%-documented nested schema, and an output schema, the description covers everything left open: replacement semantics, the branching prerequisite, failure conditions, and how to verify routes afterward. Nothing an agent needs to call 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?

With 100% schema description coverage the baseline is 3, but the description adds conceptual meaning the schema only implies: it frames the option_content/no-option_content split as "by answer" versus "linear" routing and clarifies that different answers may target different nodes or end screens. The worked example maps directly onto the nested nodes[].rules[] shape, though exact-text matching for option_content is largely restated from the schema.

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?

Opens with a concrete verb and resource: "Set where one or more nodes go next," which unambiguously identifies routing/logic configuration rather than node creation or content editing. It also states the batching advantage ("Pass multiple nodes in one call instead of separate tool calls"), which separates it from per-node siblings like clipform_add_node.

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 decision branches: linear routing uses one rule with only target_node_id; answer-based routing requires one rule per option plus an optional default, and multi-select choice nodes refuse answer rules outright. It also names the prerequisite step (enable_branching via clipform_create_form or clipform_update_node) and warns that update_node replaces the whole choice object, so the caller knows which sibling to use and in what order.

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.