A Practical Guide to Function Calling, MCP, and Agent Boundaries
A Juejin article separates three layers of AI tool development: Function Calling for structured tool intent, MCP for tool discovery and process startup, and Agent code for orchestration and failure handling. It recommends diagnosing failures from the lower layer upward and using fixed workflows instead of Agents when task paths are predetermined.
Clear separation of these layers can help developers avoid debugging configuration or orchestration failures as model-quality problems and avoid adding Agent complexity when a deterministic workflow is sufficient.
把这三个词混着用,是排查大部分 AI 工具故障时最大的障碍。
现在说"我做了个 Agent"的人,很多其实只是接了个 MCP Server。这两个词被混用得很厉害,但它们解决的根本不是同一层的问题。
混用带来的直接后果不是概念不严谨,而是故障定位错误:明明是配置文件写错了,你去改提示词;明明是编排逻辑有问题,你去换模型。每一层都会伪装成另一层的故障。
这篇文章把三层拆开,说清楚各自解决什么、成本在哪、失败时长什么样,最后给一个能直接用的判断流程。
一、先把三个词拆到不同层上
| 解决什么 | 谁定义 | 失败时的典型表现 | |
|---|---|---|---|
| Function Calling | 模型能不能输出结构化的调用意图 | 模型厂商 | 模型不用工具,或参数格式错 |
| MCP | 工具从哪来、怎么发现、怎么启动 | 协议标准 | 工具列表为空,或进程起不来 |
| Agent | 调哪个、调几次、失败了怎么退 | 你写的代码 | 死循环、重复调用、放弃太早 |