> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mcpcore.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow Builder

> Build MCP tools without writing code by connecting ready-made steps on a canvas.

## What is a workflow tool?

A **workflow tool** is a tool you build visually. Instead of writing JavaScript, you place steps on a canvas, connect them from left to right, and fill in a few fields. MCPCore turns the workflow into sandbox code when you save it.

To an AI client, a workflow tool looks exactly like a code tool: it has a name, a description and typed parameters, and it returns a result.

> **When to use a workflow**
>
> Database lookups, REST API calls, reshaping JSON, simple branching. Most read-style tools fit here.

> **[When to use code](https://docs.mcpcore.io/tools/create.md)**
>
> Loops, complex calculations, custom libraries or anything the steps below can't express.

***

## Create a workflow tool

**1. Choose Build a workflow**

On the server detail page, click **Create New Tool** and choose **Build a workflow**. You get the same choice right after creating a server.

**2. Start from a template or from scratch**

A gallery of [ready-made workflows](https://docs.mcpcore.io/tools/workflows/templates.md) opens first. Pick one to load its steps, tool name and parameters, or close the gallery to start with an empty canvas.

**3. Describe the tool**

In the left panel, set the tool **name** (lowercase `snake_case`), a **description** the AI will read, and the **parameters** the AI passes when it calls the tool. See [Parameters](https://docs.mcpcore.io/tools/parameters.md).

**4. Add and connect steps**

Drag steps from the palette onto the canvas, then connect them from left to right. Every workflow begins with a **Start** step and ends with at least one **Return** step. See [Steps](https://docs.mcpcore.io/tools/workflows/nodes.md).

**5. Configure each step**

Select a step to open its settings in the inspector on the right. Use the variable button next to a field to insert [variables](https://docs.mcpcore.io/tools/workflows/expressions.md) such as tool parameters or the output of an earlier step.

**6. Test and save**

Click **Run** to [test the workflow step by step](https://docs.mcpcore.io/tools/workflows/testing.md). When every step looks right, click **Create** (or **Save** for an existing tool). The tool is live immediately.

***

## Editor layout

| Area | Position | What it contains |
| - | - | - |
| **Tool panel** | Left | Tool name, description, parameters and the active toggle |
| **Palette** | Canvas | Steps grouped as Data, Integrations, Logic and Output |
| **Canvas** | Center | Your steps and their connections. Use **Fit to screen** to recenter |
| **Inspector** | Right | Settings of the selected step, and its output after a test run |
| **Output** | Bottom | Logs and the final result of a test run |

***

## How it runs

When you save, MCPCore compiles the workflow into JavaScript and runs it in the same isolated [sandbox](https://docs.mcpcore.io/tools/sandbox.md) as code tools. The same limits apply: execution timeout, memory and network rules.

* Steps run in the order of their connections. A step runs only after every step it depends on has finished.
* A **Condition** step sends execution down its **true** or **false** branch; steps on the other branch are skipped.
* The first **Return** step that runs ends the tool and sends its value to the AI client.
* Database connections are closed automatically when the tool finishes.

> [!NOTE]
>
> Values from parameters and earlier steps are always sent to the database as query bindings, never pasted into the SQL text. A parameter such as `' OR 1=1 --` is treated as plain data, so workflow queries are safe from SQL injection.

***

## Secrets in workflows

Database credentials and API tokens are never typed into a step. Fields such as **Host**, **Password** or **Bearer token secret** let you pick one of your server's [environment secrets](https://docs.mcpcore.io/tools/secrets.md). If the secret doesn't exist yet, choose **Create a new secret** to add it without leaving the editor; it becomes available in the field right away.

***

## Next steps

> **[Steps](https://docs.mcpcore.io/tools/workflows/nodes.md)**
>
> Reference for every step type and its fields.

> **[Variables](https://docs.mcpcore.io/tools/workflows/expressions.md)**
>
> Use parameters, secrets and step outputs inside fields.

> **[Testing](https://docs.mcpcore.io/tools/workflows/testing.md)**
>
> Run the workflow and watch each step execute.

> **[Templates](https://docs.mcpcore.io/tools/workflows/templates.md)**
>
> Five ready-made workflows to start from.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.