AI Agent Behaviour
Overview
The FlowOn AI MCP Server is designed for autonomous agent operation. When an AI agent is connected and given a task, it does not execute a single tool call and stop—it follows a disciplined execution loop, reasoning through each step, verifying the outcome, and continuing until the full task is complete.
This page describes how that loop works and the rules the agent must follow when using FlowOn MCP tools.
The Agent Execution Loop
┌─────────────────────────────────────────────────────────────────────┐
│ AGENT EXECUTION LOOP │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ RECEIVE TASK │
│ ──────────── │
│ User describes what they want in natural language │
│ │ │
│ ▼ │
│ PLAN │
│ ──── │
│ Agent reads tool descriptions and plans the sequence of steps │
│ │ │
│ ▼ │
│ EXECUTE │
│ ─────── │
│ Agent calls MCP tools one at a time, in order │
│ │ │
│ ▼ │
│ VERIFY │
│ ────── │
│ After each tool call, agent checks whether the objective │
│ is achieved. If yes → done. If no → continue. │
│ │ │
│ ▼ │
│ RECOVER │
│ ─────── │
│ If an error occurs, the agent reads the error message │
│ and retries with corrected inputs │
│ │
└─────────────────────────────────────────────────────────────────────┘
Agent Rules
The AI agent follows strict rules when using the FlowOn MCP tools. These rules are embedded in the server's system prompt and govern every tool interaction.
1. Always Read Tool Descriptions Before Calling
Tool descriptions are the authoritative specification for what a tool does and what constraints it enforces. They take precedence over the agent's general knowledge. Before executing any MCP tool, the agent reviews the tool description and validates that the planned action conforms to it exactly.
2. Never Deviate from What a Tool Supports
If a tool has documented restrictions—such as not being callable on managed solutions—the agent respects them without exception. The agent does not attempt workarounds or assume exceptions.
3. Always Retrieve Names from the System
Before referencing a Logic Flow, Logic Block, Recipe, or any other artifact by name, the agent calls the appropriate list_* tool to confirm the name exists in the connected environment. Names that exist in training data or a previous conversation may not match what is actually deployed.
┌─────────────────────────────────────────────────────────────────────┐
│ CORRECT AGENT BEHAVIOUR │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ User: "Update the CalculateCreditLimit logic block" │
│ │
│ ✓ CORRECT ✗ INCORRECT │
│ ───────── ────────── │
│ │
│ 1. Call list_all_logic_blocks 1. Immediately call │
│ to find the correct name update_logic_block_metadata │
│ 2. Confirm "CalculateCreditLimit" with the assumed name │
│ exists in the environment │
│ 3. Call get_logic_block_details │
│ to read the current metadata │
│ 4. Call update_logic_block_metadata │
│ with the updated definition │
│ │
└─────────────────────────────────────────────────────────────────────┘
4. Think Out Loud
The agent reasons step-by-step and communicates clearly at each stage—what it plans to do, what tool it is calling, what the result was, and what it intends to do next. If an error, warning, or unexpected result occurs, the agent communicates it clearly to the user before retrying.
5. Do Not Stop Until the Task is Complete
The agent continues executing until all steps in the task are done or an unrecoverable error is encountered. It does not stop after a single successful tool call if the broader task requires additional steps.
6. Do Not Ask for Confirmation on Standard Operations
If an operation is supported by the tool and the task is unambiguous, the agent proceeds without asking for user confirmation. If Dataverse does not support a required operation natively, the agent is permitted to use an alternative approach without prompting the user first.
A Worked Example
The following illustrates how an agent reasons through a multi-step task using the FlowOn MCP tools.
User request: "Create a formula logic block called 'CalcDiscount' in the Sales project that calculates a 10% discount on the total amount."
STEP 1 — Discover the project
Tool: list_projects
Reason: Confirm "Sales" exists before proceeding.
Result: ["Sales", "Operations", "Finance"] ✓
STEP 2 — Verify the project is unmanaged
Tool: get_project_details("Sales")
Reason: Cannot create in a managed solution.
Result: Solution = "SalesDev", IsManaged = false ✓
STEP 3 — Understand the data model
Tool: metadata_get_entity_attributes("opportunity")
Reason: Need attribute names to write correct formula metadata.
Result: totalamount (Money), discountamount (Money) identified ✓
STEP 4 — Create the Logic Block
Tool: create_formula_logic_block(
logicBlockName: "CalcDiscount",
projectName: "Sales",
metadata: "...",
title: "Calculate Discount",
description: "Calculates a 10% discount on the total amount"
)
Result: LogicBlockId = "a1b2c3d4-..." ✓
STEP 5 — Confirm success
Communicate result to user with the new Logic Block ID.
Task complete.