---
title: "No-code business rules: what the AI can and cannot do | FluxOS MCP Blog"
description: "Value limits, input validation, and refusals that explain themselves: how to put your business rules inside the MCP tool, on the canvas, without relying on the assistant."
url: "https://www.fluxosmcp.com/en/blog/no-code-business-rules-what-the-ai-can-and-cannot-do"
lang: "en-US"
---

[Blog](https://www.fluxosmcp.com/en/blog) · Nov 25, 2026 · FluxOS MCP Team

# No-code business rules: what the AI can and cannot do

[Leia este artigo em português](https://www.fluxosmcp.com/blog/regras-de-negocio-sem-codigo-o-que-a-ia-pode-e-nao-pode-fazer)

“Support can give up to a 15% discount. Anything above that, only the manager.”

Every company has dozens of rules like this. When an AI assistant gets access to a tool that grants discounts, the inevitable question is: **who enforces the rule?**

There are two places to put it. One of them does not work.

## Where the rule should not live

The first instinct is to write the rule into the assistant’s instructions: “never grant more than a 15% discount”. It is easy, and it is fragile, for three reasons:

- **An instruction is a request, not a lock.** An assistant follows instructions almost always. “Almost always” is not an acceptable level when money is involved.
- **The conversation can be manipulated.** Someone insists, rephrases, claims an exception. The assistant was built to help, and that works against the rule.
- **You do not control every assistant.** The same MCP server serves your team’s assistant and your client’s. Each one’s instructions are not yours to write.

The rule has to live where the assistant cannot reach: **inside the tool**. There it applies to any assistant, in any conversation, and it is written down in a place you can read, test and audit.

In FluxOS MCP, every tool is a workflow drawn on a canvas. Adding a rule means adding a decision block.

## The example: a tool that grants a discount

Let’s build the logic for `conceder_desconto`, which takes the order number and the percentage. It needs two rules:

1. the order number must have 6 digits;
2. the percentage must be greater than zero and at most 15.

If you have never opened the canvas, the tutorial [From endpoint to workflow](https://www.fluxosmcp.com/en/blog/from-endpoint-to-workflow-a-tool-that-looks-up-decides-and-answers) covers the basics: trigger, blocks, expressions and testing.

## First layer: the format of the arguments

Before any block, there is a safeguard many people forget. (The FluxOS MCP dashboard is still in Portuguese, so on-screen labels appear here as they are, with the meaning in parentheses.) The **Chamado via MCP** (Called via MCP) trigger has a **Schema de entrada** (Input schema) field, which describes the tool’s arguments. The server checks every call against that schema **before** running the workflow.

```json
{
  "type": "object",
  "properties": {
    "pedido": {
      "type": "string",
      "description": "Order number, 6 digits."
    },
    "percentual": {
      "type": "number",
      "description": "Discount as a percentage. Maximum of 15 for support.",
      "minimum": 0,
      "maximum": 100
    }
  },
  "required": ["pedido", "percentual"],
  "additionalProperties": false
}

```

If the assistant sends text where a number belongs, forgets an argument or makes up a field, the call is rejected with “Argumentos inválidos” (Invalid arguments) and the workflow never starts.

The schema is good for **format**: type, required fields, absurd ranges. For the business rule itself, the best place is the next one.

## Second layer: the decision block

After the trigger, drag in a **Se (IF)** (If) block and name it “Valid order?”. In **Regras** (Rules) mode:

- left value: `{{ $json.pedido }}`
- operator: **casa com a regex** (matches regex)
- right value: `^[0-9]{6}$`

On the **sim** (yes) output, add a second **Se (IF)**, “Within the limit?”, with two conditions combined with **E** (AND):

- `{{ $json.percentual }}` **maior que** (greater than) `0`
- `{{ $json.percentual }}` **menor ou igual a** (less than or equal to) `15`

The **sim** output of this second block is the happy path: that is where the call to your system that applies the discount goes. The **não** (no) outputs are the refusals.

The available operators cover most everyday rules: equals, does not equal, contains, starts with, ends with, greater than, less than, is empty, is true, matches regex. For rules that do not fit into rows, **Expressão** (Expression) mode accepts a written condition, such as `{{ $json.percentual <= 15 && $json.motivo != "" }}`.

## Refusing well is half the rule

A rule that only says “no” produces an assistant that keeps pushing or makes things up. The refusal has to explain **what happened** and **what to do now**.

Connect each **não** output to a **Responder ao MCP** (Respond to MCP) block with its own text.

For the invalid order:

```text
Invalid order number: provide the 6 digits, with no letters or punctuation.

```

For the discount outside the limit:

```text
Not applied: the requested discount ({{ $json.percentual }}%) is outside the 15% limit for support. Tell the person to ask the sales manager for approval.

```

With that text, the conversation ends like this:

> **Support agent:** give a 30% discount on order 884102.
>
> **Assistant:** I couldn’t apply it: 30% is above support’s 15% limit. For that amount, you need to ask the sales manager for approval. Want me to apply 15% for now?

The assistant did not get around the rule, and it was not left without an answer. It received an instruction written by someone who knows the process.

## Rules that depend on who is calling

Does the 15% limit apply to everyone? Not always. In FluxOS MCP, every call arrives with the identity of the client that owns the key, in the `$cliente` variable. It **does not come from the conversation**: it comes from the authenticated key, and the assistant cannot change it.

That allows rules like:

- `{{ $cliente.idNoSistema }}` **é igual a** (equals) `C-9`, to grant a higher limit to a specific client;
- using `$cliente.idNoSistema` in the filter of every query, so that each client sees only its own orders.

The second case is so important that it became a platform safeguard: a tool that does not filter by client, and that has not been deliberately marked as global, will not publish.

## More than two paths

When the decision has several outcomes, use **Switch (várias saídas)** (Switch (multiple outputs)). An example with three ranges:

- **up to 15%**: applies it right away;
- **from 15% to 30%**: does not apply it, logs an approval request and lets the person know;
- **other**: refuses.

The cases are evaluated in order, and the first one that matches sets the path. If none matches, the execution follows the **outro** (other) output, which is there by default. Always handle that output: it is the one that catches the case nobody thought of.

## The safeguards that live outside the canvas

Not every rule is a block. Some of the strongest ones are configuration:

- **Tools per key.** Each key reaches only the tools enabled for it. The support team’s key may not even see `conceder_desconto`.
- **Call limits.** Per minute and per day, per key. A rule like “at most 50 discounts per day” starts here.
- **Read and write.** Tools that change data are presented to the assistant as destructive, and good assistants ask for confirmation before using them. In the SQL query block, read-only mode is the default.
- **Logging.** Every call is stored, with its arguments and the path it took. When someone asks “why was this discount applied?”, the answer is in the execution.

## Test the refusals, not just the happy path

It is common to test the tool with a valid order and a 10% discount, see it work, and publish. The rules, though, are in the other cases. Before publishing, run at least:

- a value exactly at the limit (15);
- a value just above it (15.01);
- zero and a negative number;
- an order with letters or with too few digits.

On the canvas, **Executar teste** (Run test) shows which output the execution went through. If 15.01 went through **sim**, the rule is wrong, and you found out before the client did.

## What this does not solve

Two honest limits:

- **The rule has to exist in the diagram.** The canvas enforces what you drew, not what you forgot. A rule that exists only in the manager’s head stays only there.
- **The source system is still the last line of defense.** If your ERP accepts a 90% discount through the API, the canvas is the only thing between the AI and that number. When you can, have the rule in the source too.

## Summary

A rule in an assistant’s instructions is a request. A rule inside the tool is a lock. With an input schema, one or two decision blocks and well-written refusals, the question “what can the AI do?” stops depending on the mood of a conversation and gets an answer you can read in a diagram.

For the data security side, see the [seven questions to ask before connecting AI to your company’s data](https://www.fluxosmcp.com/en/blog/7-questions-to-ask-before-connecting-ai-to-your-companys-data). And for the most common stumbles when designing tools, the [seven mistakes](https://www.fluxosmcp.com/en/blog/7-common-mistakes-when-building-tools-for-ai).
