Tools: Actions the Model Takes
Functions the AI invokes to do something.
Tools: Actions the Model Takes is a free MCP Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MCP Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Meet the First Primitive
MCP gives a model three building blocks. The first is the tool: a function the AI can actually run to do something in the world. 🔧
Tools Take Action
A tool is for doing, not just knowing. Sending an email, querying a database, or creating a file all belong here because each one changes or fetches live state.
The Model Decides
You expose the tool, but the model chooses when to call it. Based on the conversation, the AI picks the right tool and fills in its arguments for you.
A Tool Is Just a Function
In the Python SDK a tool is a normal function. You mark it with the @mcp.tool() decorator and the server advertises it to clients.
@mcp.tool()
def add(a: int, b: int) -> int:
return a + bEvery Tool Needs a Name
Each tool carries a name the model uses to call it. By default the function name becomes the tool name, so add and get_weather just work.
Descriptions Guide the AI
The model reads your docstring to learn what a tool does. A clear one sentence summary makes the AI pick the right tool at the right moment.
@mcp.tool()
def add(a: int, b: int) -> int:
"""Add two numbers together."""
return a + bArguments Become a Schema
Your function's parameters turn into an input schema. The model sees the names and types so it knows exactly what data to send.
Results Flow Back
Whatever your tool returns goes back to the model as context. The AI then weaves that result into its reply to the user.
Tools Can Have Side Effects
Because a tool runs real code, it can change things: write to disk, charge a card, or post a message. That power is exactly why tools sit under user control. ⚠️
Model-Controlled by Design
MCP calls tools model-controlled. The model initiates the call, while the host app can still ask the user to approve it before anything runs.
One Tool, One Job
Keep each tool focused on a single clear action. Small, well named tools are far easier for the model to choose correctly than one giant catch-all.
Quick Check
Let's lock in what makes a tool a tool.
Recap: Tools
Nice work! A tool is a model-controlled function that does something. You name it, describe it, type its arguments, and return a result the AI can use. ✅
Frequently asked questions
Is the “Tools: Actions the Model Takes” lesson free?
Yes — the full text of “Tools: Actions the Model Takes” is free to read here on the web, and the MCP Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MCP Academy course, upgrade to CoddyKit PRO.
What will I learn in “Tools: Actions the Model Takes”?
Functions the AI invokes to do something. You practise MCP Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start MCP Academy?
No prior experience is required. MCP Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Tools: Actions the Model Takes” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this MCP Academy lesson?
Yes. Every MCP Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Tools: Actions the Model Takes
- Resources: Data the Model Reads
- Prompts: Reusable Instructions
- Picking the Right Primitive