ข้ามไปที่เนื้อหา

MCP vs Tool Calling vs Skills: Mental Model ที่คนสร้าง AI ต้องมีในปี 2026

คุณกำลังสร้าง AI agent และได้ยินคำว่า tool calling, MCP, skills กันเต็มไปหมด แต่ยังไม่มีใครอธิบายให้เห็นภาพชัดๆ ว่าสามอย่างนี้เกี่ยวกันยังไง เป็นคู่แข่งกัน? เป็นชื่อเรียกคนละแบบของของอย่างเดียวกัน? หรือต้องเลือกใช้อันเดียว?

ตอบสั้นๆ เลย: สามอย่างนี้เป็น layer ที่ซ้อนกัน ไม่ได้ให้เลือกอย่างใดอย่างหนึ่ง Tool calling คือ primitive ส่วน MCP คือ protocol และ skills คือ playbook Production agent ในปี 2026 ใช้ครบทั้งสามอย่าง


ภาพรวม: Agent Capability มีสาม Layer

ก่อนลงรายละเอียด จำภาพนี้ไว้ให้ขึ้นใจ:

┌─────────────────────────────────────────────────────────────────┐
│                                                                 │
│   WHAT can the model do?   →   TOOL CALLING   (the function)   │
│                                                                 │
│   WHERE do capabilities live?  →   MCP        (the contract)   │
│                                                                 │
│   HOW to do it well?       →   SKILLS      (the playbook)      │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

แต่ละ layer ตอบคำถามคนละข้อ และทุก layer ต้องพึ่ง layer ที่อยู่ข้างล่าง ไม่มี tool calling ก็ไม่มี MCP ส่วน skills ต้องมีทั้งสองอย่างก่อน เดี๋ยวเราไล่จากชั้นล่างสุดขึ้นไปกัน


Part 1: Tool Calling คือ Primitive

คืออะไร

Tool calling (บางที่เรียก function calling) คือ capability พื้นฐานที่สุดของ LLM ทุกวันนี้ เป็นวิธีที่ model บอกได้ว่า "ตอนนี้อากาศเป็นยังไงผมไม่รู้ แต่ผมรู้ว่าต้องไปถามใคร"

Model จะไม่มั่วคำตอบขึ้นมาเอง แต่ส่ง request ที่มีโครงสร้างออกมาแทน คือชื่อ function กับ argument ชุดหนึ่ง จากนั้น application ของคุณเป็นคนรัน function แล้วส่งผลกลับเข้าไปใน conversation

┌──────────┐      1. User asks a question        ┌──────────────────┐
│          │ ─────────────────────────────────►  │                  │
│   User   │                                     │   LLM (Claude,   │
│          │ ◄─────────────────────────────────  │   GPT-4o, etc.)  │
└──────────┘      4. Final answer                │                  │
                                                 └────────┬─────────┘
                                                          │
                                            2. Model emits tool call:
                                            {
                                              "name": "get_weather",
                                              "input": { "city": "NYC" }
                                            }
                                                          │
                                                          ▼
                                                 ┌─────────────────┐
                                                 │  Your App runs  │
                                                 │  get_weather()  │
                                                 │                 │
                                                 │  Returns: 72°F  │
                                                 └─────────────────┘
                                                          │
                                            3. Result fed back to LLM

เขียนยังไง

Tool แต่ละตัวเขียนเป็น JSON schema บอก model ว่า function ชื่ออะไร ทำอะไร และรับ argument อะไรบ้าง LLM ไม่ได้รัน function เองเลย หน้าที่ของ model มีแค่ตัดสินใจว่าจะเรียก ตอนไหน และส่ง อะไร เข้าไป คนรันจริงคือ application ของคุณ

# Python example with Anthropic SDK
tools = [
    {
        "name": "get_weather",
        "description": "Get current weather for a city",
        "input_schema": {
            "type": "object",
            "properties": {
                "city": {"type": "string", "description": "City name"}
            },
            "required": ["city"]
        }
    }
]

response = client.messages.create(
    model="claude-opus-4-7",
    tools=tools,
    messages=[{"role": "user", "content": "What's the weather in NYC?"}]
)

Model ตอบกลับมาเป็น block tool_use คุณเอาไปรัน ส่งผลกลับ แล้ว model ก็ทำงานต่อ Loop มีแค่นี้เอง

ใช้ Tool Calling ตอนไหน

Tool calling เหมาะกับกรณีที่:

  • มี 1–10 function อยู่ใน application เดียว
  • อยาก คุมเองทั้งหมด ว่า model ใช้ tool ตัวไหนได้บ้าง
  • สร้าง app ที่จบในตัว ไม่มี agent ภายนอก ไม่มี capability ที่ต้องแชร์กับใคร
  • Tool เป็น operation ง่ายๆ แบบ stateless เช่น เรียก API, lookup database, คำนวณ

ตัวอย่างคือ customer support bot ที่ค้นหา order, เช็คสถานะพัสดุ และออก refund ได้ สาม tool ใน app เดียว ใช้ tool calling ก็พอดีแล้ว

ข้อจำกัด: พอ tool เริ่มมีเป็นสิบๆ ตัว หรือหลาย app ต้องใช้ tool ชุดเดียวกัน หรืออยากให้ client discover tool ได้เองตอน runtime ถึงตอนนั้นคุณต้องขยับไป layer ถัดไป


Part 2: MCP คือ Protocol

คืออะไร

MCP (Model Context Protocol) เป็น open standard ที่ Anthropic ปล่อยออกมาตอนปลายปี 2024 กำหนดวิธีที่ AI model ใช้ discover และเรียก tool ที่อยู่บน server ภายนอก MCP คือ contract ที่แยก "การนิยาม tool" ออกจาก "การรัน tool"

ไม่มี MCP: tool เป็นของ app คุณ มี MCP: tool อยู่บน server และ MCP client ตัวไหนก็เรียกใช้ได้

                         ┌─────────────────────────────────┐
                         │         MCP Protocol            │
                         │                                 │
    ┌──────────┐         │   client      ↔      server     │         ┌───────────────────┐
    │  Claude  │ ───────►│                                 │───────► │   Tool Server     │
    │  (client)│         │   JSON-RPC 2.0 over stdio/HTTP  │         │  get_weather()    │
    └──────────┘         │                                 │         │  search_web()     │
                         └──────────────────┬──────────────┘         │  query_db()       │
    ┌──────────┐                            │                         └───────────────────┘
    │  Cursor  │ ───────────────────────────┤
    │  (client)│                            │                         ┌───────────────────┐
    └──────────┘                            └──────────────────────── │  Same tools,      │
                                                                      │  every client     │
    ┌──────────┐                                                      └───────────────────┘
    │  Notion  │ ──────────────────────────────────────────────────►
    │  (client)│
    └──────────┘

เขียนยังไง

MCP server คือ process ตัวเล็กๆ ที่ expose tool ผ่าน protocol มาตรฐาน งานของ server มีสองอย่าง คือตอบ request list_tools (discovery) กับ call_tool (execution)

# A minimal MCP server in Python
from mcp.server import Server
from mcp.server.stdio import stdio_server

app = Server("weather-server")

@app.list_tools()
async def list_tools():
    return [Tool(
        name="get_weather",
        description="Get current weather for a city",
        inputSchema={"type": "object", "properties": {"city": {"type": "string"}}}
    )]

@app.call_tool()
async def call_tool(name: str, arguments: dict):
    if name == "get_weather":
        city = arguments["city"]
        data = await fetch_weather_api(city)
        return [TextContent(type="text", text=str(data))]

async def main():
    async with stdio_server() as streams:
        await app.run(*streams, app.create_initialization_options())

จุดที่ต่างจาก tool calling ธรรมดาคือ server ตัวนี้รันแยกจาก app ของคุณ จะเป็น Claude, Cursor, agent ที่คุณเขียนเอง หรือ agent ของเพื่อนในทีม ขอแค่เป็น client ที่รองรับ MCP ก็ต่อเข้ามาใช้ tool ชุดเดียวกันได้หมด เขียนครั้งเดียว ใช้ได้ทุกคน

Discovery ทำงานยังไง

พอ MCP client ต่อเข้า server ได้ ก็จะเรียก tools/list ก่อน Server ส่งรายชื่อ tool ทั้งหมดพร้อม schema กลับมา แล้ว client ก็ส่งต่อให้ LLM เห็น ทุกอย่างเกิดตอน runtime client ไม่ต้องรู้มาก่อนเลยว่า server มี tool อะไร

Client boots  →  Connects to MCP server  →  Calls tools/list
             →  Server returns tool schemas
             →  Client injects into LLM context
             →  LLM calls tools as needed
             →  Client proxies calls to server
             →  Server executes and returns results

ใช้ MCP ตอนไหน

MCP เหมาะกับกรณีที่:

  • อยาก ใช้ tool ชุดเดียวกันในหลาย app หรือหลาย agent
  • กำลังสร้าง capability ที่ ใช้ข้ามทีมหรือข้ามองค์กร เช่น database tool ที่ทั้งบริษัทใช้ร่วมกัน
  • อยากได้ runtime discoverability ให้ client ต่อเข้ามาแล้วเห็นเองว่ามีอะไรใช้ได้บ้าง
  • อยาก decouple ตัว implementation ของ tool ออกจาก AI application

ตัวอย่างจริง: บริษัทคุณทำ MCP server ตัวเดียว มี tool สำหรับ Salesforce, Jira และ wiki ภายใน AI agent ของทุกทีมต่อเข้า server ตัวนี้ ไม่ว่าจะใช้ Claude, Cursor หรือ agent ที่เขียนเอง แก้ tool ที่เดียว ทุกทีมได้ของใหม่ทันที

ข้อจำกัด: MCP บอกแค่ว่า capability อยู่ที่ไหนและเรียกยังไง แต่ไม่ได้เก็บ ความเชี่ยวชาญ ไว้ให้ ความรู้ว่าต้องใช้ tool พวกนี้ ยังไง หลายขั้นตอนแค่ไหนถึงจะทำงานยากๆ ได้ดี MCP ไม่มีให้ ตรงนี้เป็นงานของ skills


Part 3: Skills คือ Playbook

คืออะไร

Skill คือความเชี่ยวชาญที่เขียนเก็บไว้เป็นไฟล์ เป็น bundle ที่มีโครงสร้าง ไม่ได้บอก agent แค่ว่ามี capability นี้อยู่ แต่บอกละเอียดว่าต้องใช้ยังไงให้ดี ทำตามขั้นตอนไหน โหลด context อะไร และรับมือ edge case แบบไหน

Tool calling ตอบว่า "ทำอะไรได้บ้าง" MCP ตอบว่า "tool อยู่ที่ไหน" ส่วน skills ตอบว่า "งานนี้ต้องทำยังไงถึงจะออกมาเหมือนมือโปรทำ"

skills/
├── docx-creator/
│   ├── SKILL.md          ← The playbook (triggers, steps, rules)
│   ├── templates/        ← Loaded progressively as needed
│   └── scripts/          ← Automation helpers
│
├── pdf-filler/
│   ├── SKILL.md
│   └── examples/
│
└── code-reviewer/
    ├── SKILL.md
    └── style-guide.md    ← Reference loaded on demand

เขียนยังไง

หัวใจของ skill คือไฟล์ SKILL.md ข้างในกำหนดสี่อย่าง:

  1. Triggers: user ขออะไรแบบไหนแล้ว skill นี้จะทำงาน
  2. Steps: ขั้นตอนที่ต้องทำตามทีละข้อ
  3. References: แต่ละขั้นต้องโหลดไฟล์หรือ context อะไร
  4. Rules: ข้อห้าม เกณฑ์คุณภาพ และ edge case
# SKILL: Code Reviewer

## Triggers
- User asks to review a PR or code change
- User says "review this" with code attached

## Steps
1. Load `style-guide.md` for project conventions
2. Read the diff or file provided
3. Check for: security issues, logic errors, naming violations
4. For each finding: cite the exact line, explain the issue, suggest the fix
5. Rate overall quality: Approve / Request Changes / Block

## Rules
- Never approve code with SQL injection or XSS risks
- Flag > 200-line functions for refactoring
- Check that tests exist for new public functions

จุดสำคัญคือ progressive disclosure runtime โหลดแค่ SKILL.md ก่อน ไฟล์อื่น (style-guide.md, template, script) ค่อยโหลดตอนที่ playbook เดินมาถึงขั้นที่ต้องใช้ Context เลยไม่บวม และ performance ก็ไม่ตก

User request → Trigger match → Load SKILL.md → Execute step 1
                                              → Load style-guide.md (step 2 needs it)
                                              → Execute step 2
                                              → Execute step 3 (no extra load needed)
                                              → Done

ใช้ Skills ตอนไหน

Skills เหมาะกับกรณีที่:

  • งาน ซับซ้อนและมีหลายขั้นตอน ไม่ได้จบใน tool call เดียว แต่ต้องทำต่อกันเป็นลำดับ
  • งาน ทำซ้ำบ่อย เช่น review, สร้างเอกสาร, deploy, incident response
  • อยากได้ คุณภาพเท่ากันทุกครั้ง ไม่ว่าจะ session ไหนหรือใครเป็นคนสั่ง
  • ความรู้นั้น ไม่ได้เห็นชัดตั้งแต่แรก ต้องเป็นคนที่เชี่ยวชาญและใช้เวลาพอสมควรกว่าจะรู้ว่าทำแบบไหนถึงถูก

ตัวอย่างที่ใช้กันจริงในปี 2026: skill "deploy ขึ้น production" ที่เช็ค test, bump version, เปิด PR, รอ CI แล้ว promote deployment หรือ skill "weekly report" ที่ query data source สามแหล่ง สรุปเป็นรายงาน แล้วโพสต์ลง Slack หรือ skill "security audit" ที่รันการตรวจห้าแบบต่อกัน

ข้อจำกัด: skills ทำงานคนเดียวไม่ได้ ต้องใช้ tool (ผ่าน tool calling) และดึง capability จาก server (ผ่าน MCP) Skills คือ layer ชั้นบนสุด ไม่ได้มาแทนสองชั้นล่าง


สามอย่างทำงานร่วมกันยังไง

ภาพเต็มของ production agent ในปี 2026 หน้าตาประมาณนี้:

┌────────────────────────────────────────────────────────────────────┐
│                        Production Agent                            │
│                                                                    │
│   ┌──────────────┐                                                 │
│   │    SKILLS    │  ← Playbooks loaded on trigger                  │
│   │  (the HOW)   │    encode expertise, define workflow            │
│   └──────┬───────┘                                                 │
│          │                                                         │
│          │  calls                                                  │
│          ▼                                                         │
│   ┌──────────────┐     discovers     ┌──────────────────────────┐  │
│   │     MCP      │ ────────────────► │   MCP Servers            │  │
│   │  (the WHERE) │                   │   - Salesforce tools     │  │
│   └──────┬───────┘                   │   - Internal DB tools    │  │
│          │                           │   - GitHub tools         │  │
│          │  exposes                  └──────────────────────────┘  │
│          ▼                                                         │
│   ┌──────────────┐                                                 │
│   │ TOOL CALLING │  ← Primitive function execution                 │
│   │  (the WHAT)  │    JSON schema, model decides when to call      │
│   └──────────────┘                                                 │
│                                                                    │
└────────────────────────────────────────────────────────────────────┘

ลองดู workflow จริง user สั่ง agent ว่า "ช่วย security review PR นี้หน่อย" agent จะทำแบบนี้:

  1. Skill trigger skill code-reviewer ตรงกับคำขอ agent เลยโหลด playbook ของ skill นี้ขึ้นมา
  2. MCP discovery playbook บอกให้ไปดึง diff ของ PR จาก GitHub MCP server
  3. Tool calling agent เรียก get_pull_request(pr_number=42) ผ่าน GitHub tool
  4. Skill execution ทำตามขั้นตอนใน playbook: หาช่องโหว่ เช็ค test coverage ตรวจ naming convention
  5. ผลลัพธ์ ได้ review ที่มีโครงสร้าง format ตรงตามที่ skill กำหนด

แยกกันทีละ layer ทำงานนี้ไม่ได้ แต่พอรวมกันครบสามชั้น agent ก็ทำงานได้แบบผู้เชี่ยวชาญ


Quick Reference: อะไรใช้ตอนไหน

Tool Calling MCP Skills
Mental model Function Contract Playbook
ตอบคำถาม ทำอะไรได้บ้าง? Capability อยู่ที่ไหน? ทำยังไงให้ดี?
เหมาะกับ Setup เล็กๆ ที่คุมเองได้ ระบบหลาย app ที่ต้อง scale งานซับซ้อนที่ทำซ้ำบ่อย
ขอบเขต 1–10 function, app เดียว หลาย app, หลายทีม Workflow หลายขั้นแบบมือโปร
Control คุมเองทั้งหมด (คุณนิยามทุกอย่าง) ใช้ร่วมกัน (tool อยู่ที่ server) ตามขั้นตอน (playbook กำหนด step)
แรงที่ใช้สร้าง น้อย กลางๆ กลางถึงมาก
แรงที่ใช้ reuse มาก (copy-paste) น้อย (ต่อแล้ว discover) น้อย (trigger แล้วโหลด)
Use case ปี 2026 Chatbot ง่ายๆ, prototype เร็วๆ Tool infrastructure ระดับบริษัท Agent automation, งานที่ต้องใช้ความเชี่ยวชาญ

Decision Tree: เพิ่มแต่ละ Layer ตอนไหน

Is your AI feature a simple Q&A or single-step action?
├── YES → Tool Calling only. Define 1-5 functions. Ship it.
└── NO  → Continue...

Do multiple apps or agents need the same capabilities?
├── YES → Add MCP. Build a server. Let clients discover tools at runtime.
└── NO  → Tool Calling in your app is fine. Continue...

Is the task multi-step, repeated, and quality-sensitive?
├── YES → Add a Skill. Encode the expertise in SKILL.md.
└── NO  → You're done. MCP + Tool Calling covers it.

พลาดกันบ่อย อย่าทำ

พลาดข้อ 1: ใช้ MCP ทั้งที่ Tool Calling ก็พอ App เดียวมีห้า tool ไม่ต้องมี server ใส่ tool ลงไปใน app ตรงๆ เลย MCP มีภาระด้าน operation ตามมาด้วย ยอมจ่ายเฉพาะตอนที่ต้องแชร์ tool ข้ามทีมหรือข้ามระบบจริงๆ

พลาดข้อ 2: หวังให้ MCP มีความเชี่ยวชาญมาให้ MCP บอก agent ได้แค่ว่ามี search_codebase() อยู่ แต่ไม่ได้บอกว่าควร search ตอนไหน ต้องตั้ง query แบบไหน หรือ อ่านผลยังไง เรื่องพวกนี้เป็นงานของ skill

พลาดข้อ 3: เขียน skill แต่ไม่ใส่ trigger Skill ที่ไม่มี trigger ก็ไม่มีวันได้รัน เขียน trigger ให้ชัด ถ้า trigger กว้างเกินไป skill จะโผล่มาตอนที่ไม่ควรโผล่ แล้ว context ของ agent ก็รกไปหมด

พลาดข้อ 4: มองว่าเป็นตัวเลือกแทนกัน ข้อนี้เจอบ่อยที่สุด Tool calling ไม่ใช่ "MCP รุ่นง่าย" และ MCP ก็ไม่ใช่ "skill รุ่นหรู" ทั้งหมดเป็น layer ที่ซ้อนกัน production agent ของคุณจะต้องมีครบทั้งสาม


เริ่มจากตรงไหนดีในปี 2026

ถ้าวันนี้คุณจะเริ่มสร้าง agent ตัวแรกที่ใช้งานจริง เริ่มแบบนี้:

Week 1 — ทำ tool calling ให้ใช้ได้ก่อน เลือก capability มาหนึ่งอย่างที่ agent ต้องใช้ (search, lookup database, ส่ง email) เขียนเป็น JSON schema ต่อเข้ากับการเรียก LLM แล้วลองรัน loop ดู

Week 2 — แยกออกไปเป็น MCP เมื่อเริ่มต้องแชร์ พอมี app ที่สองต้องใช้ tool ตัวเดียวกัน ก็ย้าย tool ออกไปเป็น MCP server ใช้ MCP SDK ตัว official สำหรับ Python หรือ TypeScript แล้ว app แรกก็จะกลายเป็น client ไปเอง

Week 3 — เขียน skill แรก เลือกงานที่ agent ทำซ้ำบ่อยที่สุดและต้องการคุณภาพสูงที่สุด เขียน SKILL.md กำหนด trigger, step และ reference แล้ววัดว่า output ดีขึ้นไหม ซึ่งดีขึ้นแน่นอน


Summary

ที่คนสับสนระหว่าง tool calling, MCP และ skills ก็เพราะเอาคำถามสามข้อที่คำตอบไม่เหมือนกันมาปนเป็นเรื่องเดียว

Tool calling ตอบว่า model ทำอะไรได้บ้าง เป็นกลไก function ระดับ primitive เหมาะกับ 1–10 capability ใน application เดียวที่คุณคุมเองได้

MCP ตอบว่า capability อยู่ที่ไหน เป็น open protocol ที่ให้คุณสร้าง tool infrastructure ครั้งเดียว แล้ว agent, app และ assistant ทุกตัว discover และใช้ได้ตอน runtime

Skills ตอบว่า งานซับซ้อนต้องทำยังไงถึงจะดี เป็น playbook ที่เขียนเก็บไว้ เปลี่ยนการเรียก tool ดิบๆ ให้กลายเป็น workflow หลายขั้นตอนระดับมือโปรที่ทำซ้ำได้ทุกครั้ง

มองเป็น stack: tool คืออะตอม MCP คือ infrastructure ส่วน skills คือความฉลาด Production agent ในปี 2026 ไม่ได้เลือกแค่ชั้นใดชั้นหนึ่ง แต่ใช้ทั้งสามชั้นประกอบกัน ระบบที่ได้จึงทำงานได้จริง scale ได้ และมีประโยชน์จริงๆ

เริ่มจาก tool พอต้องแชร์ค่อยขยับไป MCP และเพิ่ม skills เมื่ออยากให้ agent เก่งเรื่องไหนเป็นพิเศษ

Discussion

Have thoughts on this post? Share them below — questions, corrections, or your own experience are all welcome.