Tool Use, Function Calling and MCP Explained

On its own, a language model only produces text. Tools let it do things: search, calculate, read a file, call an API or update a calendar.
How Tool Use Works
- You describe the available tools to the model: name, purpose and inputs.
- The model decides whether a tool is needed and produces a structured request ("call get_weather with city = Leeds").
- Your software runs the tool and returns the result.
- The model uses the result in its answer or decides what to do next.
This is often called function calling or tool calling. The model doesn't run anything itself. Your code does.
What Tools Enable
- Up-to-date information from search or databases.
- Accurate calculations and data analysis.
- Actions: sending emails, booking, creating tickets.
- Working with files and apps.
- Multi-step agents that plan, act and check.
The Standardisation Problem
Every app and tool used to need custom connections. Model Context Protocol (MCP) is an open approach for connecting AI applications to tools and data in a consistent way, like a common plug. A tool provider can offer an MCP "server", and compatible AI apps can use it.
Risks
- Over-broad permissions: an agent that can act can act wrongly.
- Prompt injection: content the model reads (web pages, emails) may contain hidden instructions.
- Data exposure: tools may send sensitive information to third parties.
- Untrusted servers: connecting to unknown tools is like installing unknown software.
- Silent failures: the model may report success when a tool failed.
Safe Practice
- Grant the minimum access and prefer read-only first.
- Require approval for irreversible actions.
- Use trusted tools, and review what they can do.
- Log tool calls.
- Treat tool outputs as data, not instructions.
Takeaway
Tools turn chat into action. Standards like MCP make connections easier, which makes careful permissions even more important.
