惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
F
Fortinet All Blogs
J
Java Code Geeks
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
M
MIT News - Artificial intelligence
腾讯CDC
Last Week in AI
Last Week in AI
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Proofpoint News Feed
博客园 - 叶小钗
Recent Announcements
Recent Announcements
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理
L
LangChain Blog
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
What Is a “Tool” in MCP (And Why It Matters More Than You...
Saras Growth · 2026-05-03 · via DEV Community

Now that we understand what MCP is, let’s focus on the most important concept:

Tools

If MCP is the system,
tools are what make it useful.


🧠 Simple Definition

A tool is:

A structured action that the model can choose to perform.

In simple terms:

👉 If the model wants to do something, it uses a tool.


⚠️ Important Clarification

A tool is not just a function.

It’s a function with:

  • a clear name
  • a clear purpose
  • defined inputs

This structure is what allows the model to understand and use it.


🧩 What a Tool Looks Like

Let’s take an example:

get_user_orders(user_id, limit)

Enter fullscreen mode Exit fullscreen mode

This tool tells the model:

  • what it does → get user orders
  • what it needs → user_id, limit

🔄 How the Model Uses a Tool

User asks:

“Show my last 3 orders”


Step 1 — Model sees available tools

  • get_user_orders
  • cancel_order
  • search_products

Step 2 — Model decides

It thinks:

“This looks like an order-related request → use get_user_orders”


Step 3 — It generates a tool call

{
  "tool": "get_user_orders",
  "arguments": {
    "user_id": "123",
    "limit": 3
  }
}

Enter fullscreen mode Exit fullscreen mode


Step 4 — System executes it

The MCP server runs the logic and returns data.


Step 5 — Model responds

It converts the result into a user-friendly answer.


🧠 Key Insight

The model does NOT see your code.

It only sees:

  • tool name
  • description
  • input structure

👉 That’s what it uses to decide.


⚠️ Why Tool Design Matters

If your tools are unclear, your system breaks.


❌ Bad Tool

process_data(data)

Enter fullscreen mode Exit fullscreen mode

Problems:

  • What does it do?
  • When should it be used?
  • What does “data” mean?

👉 The model gets confused.


✅ Good Tools

get_user_orders(user_id, limit)
cancel_order(order_id)
search_products(query)

Enter fullscreen mode Exit fullscreen mode

Now:

  • Each tool has a clear purpose
  • The model can easily choose

🔥 Golden Rules for Designing Tools


1. One tool = one action

Avoid combining multiple responsibilities.


2. Use clear naming

Prefer:

  • get_user_orders
  • create_order

Avoid:

  • handle_data
  • process_request

3. Be explicit with inputs

Bad:

{ "data": "string" }

Enter fullscreen mode Exit fullscreen mode

Good:

{ "user_id": "string", "limit": "number" }

Enter fullscreen mode Exit fullscreen mode


4. Design for clarity, not convenience

Your backend might support complex operations,
but tools should be simple and understandable.


🧠 A Better Way to Think About Tools

Think of tools as:

The set of actions available to the model

If a tool doesn’t exist:

👉 The model cannot perform that action.


⚠️ Common Mistakes

  • Creating too many tools → harder to choose
  • Making tools too generic → unclear usage
  • Overloading a single tool → confusion

🧭 Why This Concept Is So Important

Tool design directly affects:

  • how well the model performs
  • how accurate decisions are
  • how scalable your system becomes

🧭 What’s Next

Now that we understand tools, the next step is:

Where do these tools actually live, and who executes them?

We’ll break down the MCP server — the part that turns decisions into real actions.