Tools, MCP and reasoning

Tools, MCP and reasoning

AI models can only write text, so how do they do maths or use your apps? See how tools, MCP and step-by-step reasoning fill the gap.

A simple sum and the word strawberry with its letters counted

The maths problem

How much is 2+2? How many “r”s are there in the word “strawberry”?

Humans don’t answer these by memorising; we calculate. AI models predict the next token, which is why early models used to struggle with such questions.

Text going into a model and only text coming out

Why can’t the models calculate?

As we saw in the last lesson, LLMs work on a simple principle: x tokens in, the (x+1)th token out. For text models, the input is text and so is the output. They have no other way to execute anything.

Solution: the tool declaration

When you ask Claude or ChatGPT “2+2?”, the platform, without you knowing, sends this to the model:

User: How much is 2+2?
Platform: You have an addition
tool that returns the sum of
numbers. Ask me to run it, and
I will give you the result.

A model asking a server to run a tool, and the server returning 4

Tool call

The model then asks the platform: “Please run the addition tool with the numbers 2 and 2.”

The platform runs the code on its servers and sends the output, 4, back to the model. Meanwhile, it shows you that a tool is being called.

A chat reply saying 2 + 2 is 4

Final model output

Now the model’s context has all the previous messages, its own tool request and the tool’s result, all as text. Based on all this context, it outputs “2 + 2 is 4”.

Icons for web search, code and files

Tool examples

Claude and ChatGPT have a few default tools, and the platform sends their definitions with each of your requests, like:

  1. Web search, for real-time information
  2. Code execution: the model writes code, the platform runs it
  3. Reading files, like your attachments

A toy car in a shopping cart and an email inbox

Actions in other apps

These tools are fine, but what if I want ChatGPT to buy me a toy car from Amazon, or check my Gmail for something new from my boss?

You would have to provide tools to search and buy on Amazon, and to search Gmail by sender.

Many apps plugging into one standard socket

Standardisation

You could write those tools yourself, but you would also need to run them on your servers and send back the results. That is a big setup, and plenty of people want the same thing. It makes more sense for Amazon or Google to build standard tools once.

Apps connected to an AI assistant through one shared protocol

MCP

That is exactly what MCP/Connectors do. They share predefined tool definitions with Claude or ChatGPT, handle permissions, run the tools and return the results, all through a standard protocol called MCP.

The sum 2+2×5 broken into two numbered steps

Reasoning

How would you answer a question like 2+2×5?

Before doing any maths, you break the problem into steps:

  1. Do the multiplication first.
  2. Then do the addition.

A model writing out its steps before acting

Reasoning in writing

You did this in your head; LLMs do it in writing. The model writes its steps out as text, adds them to the context, then makes tool calls following those steps. The “thinking” or “effort” setting is how much of this it writes before acting.

An expert's steps being copied by a model

Post-training

Since the steps decide which tools are called, and in what order, a model that writes better steps gives better output. This is largely what post-training does: models learn the steps real experts take, and replicate them.

Summary

  1. Why tools: LLMs only predict the next token. They can’t calculate or fetch live data on their own.
  2. Tool calls: The model asks for a tool to be run. The platform runs it and sends back the result.
  3. MCP: A standard way to plug in app tools, like Gmail or Amazon.
  4. Reasoning: The model writes out its steps before acting. Post-training teaches it to plan these steps better.