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
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 | Who | Next |
|---|---|---|---|
| 1 | User gives a goalStarte.g. 'Refund order 1042 and email the customer'User · step 2 | User | step 2 |
| 2 | Plan the stepsModel reasons over the goal and the available tool schemasAI agent · step 3 | AI agent | step 3 |
| 3 | Pick the next toolEmits a tool_use call with JSON argumentsAI agent · step 4 | AI agent | step 4 |
| 4 | Can it be undone?DecisionTool metadata: readOnly / destructive / idempotent hintsAI agent · Yes, safe: step 7, No: step 5 | AI agent | Yes, safe: step 7, No: step 5 |
| 5 | Approve the action?DecisionShows the exact tool and arguments; approve, edit or rejectHuman approver · Approved: step 7, Rejected: step 6 | Human approver | Approved: step 7, Rejected: step 6 |
| 6 | Stopped with reasonEndUser · Done | User | Done |
| 7 | Run the tool with scoped accessMCP tools/call; OAuth token with the user's permissions; argument validationMCP servers and tools · step 8 | MCP servers and tools | step 8 |
| 8 | Return the resultDocumentStructured result or error; treated as untrusted dataMCP servers and tools · step 9 | MCP servers and tools | step 9 |
| 9 | Check the resultValidate against the plan; retry once on a transient errorAI agent · step 10 | AI agent | step 10 |
| 10 | Goal met?DecisionAlso stops at the step or cost capAI agent · Yes: step 11, No: next step: step 3 | AI agent | Yes: step 11, No: next step: step 3 |
| 11 | Report what was doneSummary with every action taken and linksAI agent · step 12 | AI agent | step 12 |
| 12 | Task completeEndUser · Done | User | 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_forwardFor 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
- 1List the agent's tools and sort them into read-only, reversible and irreversible. Only the first group should run without a person.
- 2Give each tool the narrowest access it needs, with the user's own permissions, never a shared admin key.
- 3Cap the number of steps and the spend per task, so a confused agent stops instead of looping.
- 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
- AI feature integrationTaking an AI feature from idea to production: pick the use case, test models against real examples, add guardrails, pass a security review, and roll out in stages with monitoring.
- RAG pipelineHow retrieval-augmented generation answers questions from your own documents: documents are split, embedded and indexed, then each question pulls the best passages and the model answers with citations.
- MCP server integrationConnecting an internal system to AI assistants through a Model Context Protocol server: design the tools, secure them, test them, review them and roll them out with monitoring.
- LLM evaluation and releaseHow a team changes a prompt or model safely: run the evaluation suite, compare against the current version, release to a slice of traffic, watch the numbers and roll back fast if needed.