Skip to main content

Best Practices

For AI Agents

┌─────────────────────────────────────────────────────────────────────┐
│ AGENT BEST PRACTICES │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ 1. DISCOVER BEFORE YOU ACT │
│ ──────────────────────── │
│ Always list projects, flows, and blocks before referencing │
│ them by name. Names in your training data or a previous │
│ conversation may not match names in the actual environment. │
│ │
│ 2. READ THE SCHEMA FIRST │
│ ─────────────────────── │
│ Before building logic for an entity, call │
│ metadata_get_entity_attributes to understand the data model. │
│ Never assume attribute names, types, or option set values. │
│ │
│ 3. CHECK DEPENDENCIES BEFORE UPDATING │
│ ────────────────────────────────── │
│ Before modifying a Logic Block or Flow, call the dependency │
│ tool to understand what else will be affected. Communicate │
│ the impact to the user before proceeding. │
│ │
│ 4. VERIFY THE SOLUTION STATE ON FAILURE │
│ ────────────────────────────────── │
│ If a create or update fails, call get_project_details to │
│ confirm the solution is unmanaged before retrying. │
│ │
│ 5. PAGINATE COMPLETELY │
│ ───────────────────── │
│ When searching for a specific artifact, continue paginating │
│ until it is found or MoreRecords is false. Never assume an │
│ artifact does not exist based on the first page alone. │
│ │
│ 6. READ BEFORE YOU WRITE │
│ ───────────────────── │
│ Before updating a Logic Block or Flow, call get_*_details to │
│ read the current metadata. Partial updates are not supported │
│ — the full metadata must be provided in every update call. │
│ │
└─────────────────────────────────────────────────────────────────────┘

For Administrators

Use Unmanaged Solutions for Development

All FlowOn projects where active development is happening should be linked to unmanaged solutions. This ensures the AI agent and human designers can create and modify artifacts freely without hitting the managed solution protection.

Use Managed Solutions for UAT and Production

When deploying to UAT or Production environments, import managed solutions. The MCP Server's managed solution protection will prevent AI agents from accidentally modifying production artifacts, even if the agent is connected to the wrong environment.

Publish After Bulk Changes

If an AI agent creates or updates multiple artifacts in a single session, call publish_customizations at the end of the session to ensure all changes are active in the FlowOn runtime. Without publishing, some changes may not take effect immediately.

Scope One MCP Server Per Environment

Configure a separate MCP Server instance for each Dynamics 365 environment (Development, UAT, Production). This means:

  • An agent working on development never accidentally touches production
  • Managed solution protection provides a reliable safety net
  • Environment-specific connection strings are kept separate and secure
┌─────────────────────────────────────────────────────────────────────┐
│ RECOMMENDED ENVIRONMENT SETUP │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ DEVELOPMENT PRODUCTION │
│ ──────────── ────────── │
│ • MCP Server (Dev) • MCP Server (Prod) │
│ • Unmanaged solutions • Managed solutions │
│ • AI agent: read + write • AI agent: read only (enforced │
│ • Human designers active by managed solution protection) │
│ • FlowOn CI/CD exports • FlowOn CI/CD imports │
│ │
└─────────────────────────────────────────────────────────────────────┘

Pair with FlowOn CI/CD Tools

The MCP Server handles building FlowOn configuration through AI. FlowOn CI/CD Tools handles deploying that configuration across environments. Use them together:

  1. AI agent creates or modifies artifacts in Development via the MCP Server
  2. FlowOn CI/CD Tools exports the updated solution as a .flop package
  3. FlowOn CI/CD Tools imports the package into UAT and Production
  4. Managed solution protection prevents any further AI modification in those environments

FlowOn AI MCP Server: Where AI and business logic meet, without writing a single line of code.