By now, we’ve covered:
- tools (actions the model can take)
- MCP server (execution layer)
- MCP client (orchestration layer)
Now let’s look at something that often causes confusion:
What’s the difference between tools and resources?
🧠 Simple Definitions
🔧 Tool
Something the model uses to perform an action
📚 Resource
Something the model uses to read data
⚠️ The Core Difference
| Type | Purpose |
|---|---|
| Tool | Do something |
| Resource | Know something |
🧩 Examples
Tools (actions)
- create_order
- cancel_order
- send_email
👉 These:
- change state
- trigger operations
Resources (data)
- user_profile
- product_catalog
- documents
👉 These:
- are read-only
- provide context
🧠 Why This Separation Matters
If you mix these concepts, your system becomes:
- inefficient
- harder to reason about
- more error-prone
⚠️ Common Mistake
Using tools for everything.
❌ Example
get_user_profile(user_id)
This is a read operation, but implemented as a tool.
✅ Better Approach
- Resource →
user_profile - Tool →
update_user_profile
👉 Now:
- reading is simple
- writing is explicit
🔥 Rule of Thumb
If it changes something → Tool
If it only provides data → Resource
🧠 But It’s Not Always That Simple
Some operations look like reads but are actually dynamic.
Example
search_products(query)
Why is this a tool?
Because:
- results depend on input
- it involves processing
- it’s not static data
Compare with Resource
product_catalog
👉 Static dataset → resource
🧠 Better Mental Model
Think of it like this:
- Resources → database tables
- Tools → API endpoints
⚠️ What Happens If You Get This Wrong?
Everything as tools
- unnecessary execution
- higher latency
- harder decision-making
Everything as resources
- no clear actions
- limited functionality
👉 Balance is key.
🧠 Real Example (E-commerce)
Resources
- user_profile
- product_catalog
Tools
- search_products
- create_order
- cancel_order
👉 Clean separation → predictable behavior
🧭 Why This Matters in Practice
This distinction helps you:
- design better systems
- reduce unnecessary calls
- improve model decision-making
🧭 What’s Next
Now that we understand tools and resources, let’s go deeper:
How does MCP actually communicate under the hood?
We’ll look at request/response flow and how everything connects in real systems.
Top comments (0)