# The StaticResponse Node

> The StaticResponse node is a simple utility node that returns a hardcoded string defined directly within the workflow.

- Skill: `tools-only/the-staticresponse-node` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add tools-only/the-staticresponse-node`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/the-staticresponse-node/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tools-only (https://skillmd.com/u/tools-only)
- Updated: 2026-09-29
- Page: https://skillmd.com/skills/tools-only/the-staticresponse-node

---

## The `StaticResponse` Node

### Overview

The **`StaticResponse`** node is a simple utility node that returns a hardcoded string defined directly within the
workflow. It is incredibly versatile, serving as a powerful tool for debugging, providing static instructions, or
delivering canned responses without the need for an LLM call.

A key feature of this node is its ability to act as a **responder**. When configured to return to the user, it can even
simulate a streaming response, delivering its content word-by-word as if it were generated by a live model.

### Configuration

Here is the complete JSON structure for a `StaticResponse` node.

```json
{
  "title": "A descriptive name for this node (Optional)",
  "type": "StaticResponse",
  "content": "This is the text that will be returned by the node.",
  "returnToUser": false
}
```

-----

### Fields

Each field is explained in detail below.

* #### **`title`**

\* **Type**: `String`\* **Required**: No \* **Description**: An optional, human-readable name for the node. It's used
for logging and makes the workflow easier to understand. It doesn't affect the node's execution.

* #### **`type`**

\* **Type**: `String`\* **Required**: Yes \* **Description**: This **must** be the exact string `"StaticResponse"` to
identify the node's function.

* #### **`content`**

\* **Type**: `String`\* **Required**: Yes \* **Description**: The static text content that the node will output. This
can be a single word, a full paragraph, or even a large multi-line block of text. Standard JSON string escaping (e.g.,
`\n` for newlines) applies.

* #### **`returnToUser`**

\* **Type**: `Boolean`\* **Required**: No \* **Description**: A standard workflow flag that designates this node as the
final responder. If set to `true`, this node's `content` will be sent to the user. This also enables the node's
streaming capability. \* **Default Behavior**: If omitted, this field defaults to `false`.

-----

### Examples

The `StaticResponse` node can be used in two primary ways.

#### Example 1: Providing Input to Another Node

Here, the first node provides a static system prompt, which the second `Standard` node then uses to answer the user's
question.

```json
{
  "nodes": [
    {
      "title": "Set Persona",
      "type": "StaticResponse",
      "content": "You are a ship's computer from a sci-fi show. Your designation is Unit 734. You are logical, precise, and respond only with factual data."
    },
    {
      "title": "Respond to User as Unit 734",
      "type": "Standard",
      "systemPrompt": "{agent1Output}",
      "prompt": "Analyze the user's query and provide a direct response.",
      "endpointName": "Creative-Fast-Endpoint",
      "returnToUser": true
    }
  ]
}
```

#### **Resulting Output:**

In the scenario above, the string from the first node's `content` field is stored in the `{agent1Output}` variable,
which is then used as the `systemPrompt` for the second node.

-----

#### Example 2: As a Streaming Responder

This workflow uses a single `StaticResponse` node to send a pre-written message directly to the user. If the workflow is
triggered in streaming mode, this text will appear to type out word-by-word.

```json
{
  "nodes": [
    {
      "title": "Return System Status Message",
      "type": "StaticResponse",
      "content": "Affirmative. All systems are operating within nominal parameters. This is a pre-recorded message. No further assistance is required.",
      "returnToUser": true
    }
  ]
}
```

#### **Resulting Output:**

The string from the `content` field is sent directly to the user as the final response.

-----

### Behavior and Edge Cases

* **Output Variable**: The string from the `content` field is always assigned to a variable based on the node's position
  in the workflow (e.g., `{agent1Output}`, `{agent2Output}`, etc.).
* **Streaming Behavior**: If `returnToUser` is `true` and the workflow is executed in streaming mode, the node will
  output its content as a generator, yielding the text at approximately 50 words per second.
* **Non-Streaming Behavior**: In a non-streaming context, or if `returnToUser` is `false`, the node returns its entire
  `content` string as a single, complete unit.
* **Missing or Empty `content`**: If the `content` field is missing from the configuration or is an empty string (
  `"content": ""`), the node will return an empty string.
