Why Function Calling, MCP, and Skills Matter for Modern AI Agents
This article explains the core concepts of Function Calling, Model Context Protocol (MCP), and Skills, showing how they build on each other to enable reliable tool use, reduce integration costs, and let users define complex workflows with natural language.
This series, based on the author Shen Xun's practical experience with the Lynxe Func‑Agent framework, aims to demystify ReAct‑based agents and their engineering value.
Background and Motivation
The author created Lynxe to explore frontier best practices for AI agents. Lynxe solves over 80% of his own problems, prompting a detailed write‑up to help others get started quickly.
Core Concepts
Function Calling : The fundamental ability for an LLM to invoke external tools. The model receives a user request and a list of tool descriptions, decides whether a tool is needed, and returns a structured JSON payload (e.g.,
{"id":"chatcmpl-abc123","choices":[{"message":{"tool_calls":[{"id":"call_abc123","type":"function","function":{"name":"get_weather","arguments":"{\"city\":\"北京\",\"date\":\"today\"}"}}]}}]}). Key fields are tool_calls, function.name, and function.arguments.
Model Context Protocol (MCP) : An open standard (originating from Anthropic and donated to the Linux Foundation) that wraps Function Calling in a JSON‑HTTP protocol, allowing any external system (GitHub, databases, Slack, etc.) to be accessed uniformly.
Skills : Anthropic’s approach that lets users define commands, scripts, and resources in plain text (e.g., SKILL.md) and load them via a dedicated function load_skill(skill_name). Skills rely entirely on Function Calling for loading and execution.
Why These Technologies Are Needed
Traditional systems handle only structured data; LLMs excel at unstructured text. Function Calling bridges this gap by converting natural‑language requests into structured function calls. However, integrating each legacy system individually is costly, which MCP addresses by providing a standardized JSON‑RPC interface. Skills further reduce complexity by allowing users to describe multi‑step workflows in natural language rather than writing code.
Typical Tool‑Calling Workflow
LLM receives user request and tool descriptions.
LLM decides whether a tool is needed and, if so, generates a structured tool_calls JSON.
The system parses the JSON, extracts function.name and function.arguments, and invokes the corresponding tool (e.g., a weather API).
The tool result is returned to the LLM, which may call additional tools or produce the final answer.
// Example JavaScript extraction and execution
const toolCall = response.choices[0].message.tool_calls[0];
const functionName = toolCall.function.name; // "get_weather"
const functionArgs = JSON.parse(toolCall.function.arguments); // {city:"北京",date:"today"}
const tools = {
get_weather: (city, date) => `北京今天天气:25°C,晴天`
};
const result = tools[functionName](functionArgs.city, functionArgs.date);From Function Calling to MCP and Skills
MCP translates Function Calling calls into JSON‑HTTP requests, enabling seamless integration with existing services. Skills use a single loading function ( load_skill) to inject the content of a SKILL.md file into the LLM’s context, after which the model follows the defined steps, optionally invoking scripts (e.g., scripts/rotate_pdf.py) via Function Calling.
Competitive Relationship
Both MCP and Skills aim to solve the same problem—integrating multiple legacy systems for complex multi‑step tasks—but they take different routes. MCP adds a thin protocol‑conversion server on top of Function Calling, while Skills skip the server and rely on direct command‑line or curl calls, offering richer textual workflow definitions. This makes them more of competitors than complementary tools.
Practical Insights from Lynxe
Agents should expose all capabilities as functions, making functions first‑class citizens.
Structured input/output (JSON) is essential for reliable integration with existing business logic, forms, and APIs.
Skills still suffer from vague textual descriptions and limited integration with non‑chat UI components.
By combining Function Calling, MCP, and Skills, Lynxe demonstrates a complete ecosystem for building robust, extensible AI agents that can handle uncertainty while interacting with real‑world systems.
Alibaba Cloud Developer
Alibaba's official tech channel, featuring all of its technology innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
