AI Agent Workflow: Tool Calling and MCP Process Flow

How an agentic AI system works through a task: it plans, calls tools through MCP servers with scoped access, asks a person before risky actions, checks results and loops until the goal is met.

4 teams12 steps3 decisionsFree download

Edit this flowarrow_forward
AI agent with tools and MCP processUser3AI agent6MCP servers and tools2Human approver1Yes, safeNoApprovedRejectedYesNo: next stepUser givesa goal2Plan the steps3Pick the nexttool?Can it beundone??Approve theaction?7Run the toolwith scopedaccessReturn theresult9Check theresult?Goal met?11Report whatwas doneTaskcompleteStoppedwithreason

Free to download. Edit it in Flow Studio to change the teams and steps, ask AI for changes, or export to PowerPoint, Word or draw.io.

Step by step

The same flow as a numbered list, ready for an SOP, a BRD or a ticket.

#Step
1User gives a goalStarte.g. 'Refund order 1042 and email the customer'User · step 2
2Plan the stepsModel reasons over the goal and the available tool schemasAI agent · step 3
3Pick the next toolEmits a tool_use call with JSON argumentsAI agent · step 4
4Can it be undone?DecisionTool metadata: readOnly / destructive / idempotent hintsAI agent · Yes, safe: step 7, No: step 5
5Approve the action?DecisionShows the exact tool and arguments; approve, edit or rejectHuman approver · Approved: step 7, Rejected: step 6
6Stopped with reasonEndUser · Done
7Run the tool with scoped accessMCP tools/call; OAuth token with the user's permissions; argument validationMCP servers and tools · step 8
8Return the resultDocumentStructured result or error; treated as untrusted dataMCP servers and tools · step 9
9Check the resultValidate against the plan; retry once on a transient errorAI agent · step 10
10Goal met?DecisionAlso stops at the step or cost capAI agent · Yes: step 11, No: next step: step 3
11Report what was doneSummary with every action taken and linksAI agent · step 12
12Task completeEndUser · Done

When to use it

Use it to design or explain an AI agent that does work in other systems (CRM, ticketing, email, databases) through tool calls or Model Context Protocol (MCP) servers, with a person approving anything that can't be undone.

Who's involved

  • User3
  • AI agent6
  • MCP servers and tools2
  • Human approver1

Yours works differently?

Describe your own process in a few sentences and Flow Studio draws it, with your teams and your rules.

Describe your processarrow_forward

For the technical team

The build decisions behind this flow. Each step above also carries its technical detail.

  • 01Loop: model call with tool schemas → tool_use → execute → tool_result → model call, until a final answer or the step cap (e.g. 15).
  • 02Tools as MCP servers over stdio (local) or Streamable HTTP (remote) with OAuth 2.1; validate every argument against the JSON schema.
  • 03Approval gate: tools tagged destructive pause the loop and send an approval request with the exact arguments.
  • 04Treat tool output as data: never follow instructions found in fetched pages, emails or files.
  • 05Trace each run (OpenTelemetry spans per model and tool call) with cost, latency and the final outcome.

How to get it right

  1. 1List the agent's tools and sort them into read-only, reversible and irreversible. Only the first group should run without a person.
  2. 2Give each tool the narrowest access it needs, with the user's own permissions, never a shared admin key.
  3. 3Cap the number of steps and the spend per task, so a confused agent stops instead of looping.
  4. 4Keep a readable log of every tool call and result. It's how you debug, and how you answer 'why did it do that?'.

Questions

What is an agentic workflow?

A workflow where an AI model decides the next step itself: it breaks a goal into steps, calls tools to read or change data, looks at the results and repeats until the goal is done or it needs a person.

What is MCP (Model Context Protocol)?

An open standard for connecting AI applications to tools and data. An MCP server exposes tools (actions), resources (data) and prompts in one format, so any MCP-capable client, such as Claude, ChatGPT, Copilot Studio or an IDE, can use them without custom glue code.

How do you stop an AI agent from doing something harmful?

Limit its tools and permissions, require human approval for irreversible actions, validate tool inputs, cap steps and cost, treat content from tools as untrusted (prompt injection), and log everything for review.

More process flow templates

See all 34 process flow templates