← Claude & OpenAI Made Easy
18 min

Tools the Provider Runs for You, and MCP

Web search, code running, file search and MCP: what each does, what it costs and the risks.

Lesson 7 of 11
0 done
In plain English

Tools let a model search the web, run code and read files. Some run in your app. Others run on the provider's computers. MCP is a shared standard for connecting outside services. Keep the toolbox small and add human checks.

MCP
Model Context Protocol, a standard for connecting AI to tools.
Sandbox
A safe space where code can run without harming your system.
Provider tool
A tool that runs on the AI company's computers.
Picture it
Tools a model can use
Model
Decides what to use
Web search
Facts from today
Code running
Maths and files
File search
Your documents
MCP servers
Outside services
Your own tools
Private data

Models know a lot, but they cannot see the web or run a spreadsheet on their own. Tools fix that. In the Claude docs, tools differ mainly by where the code runs. Some tools run in your app. Others run on the provider's computers. OpenAI has the same split. This lesson shows the kinds and when to pick each.

Two places a tool can run

Common provider tools

  • Web search. The model looks things up and cites sources. It helps with news and facts past its training.
  • Reading web pages. The model fetches a page or a PDF and reads it.
  • Code running. The model writes and runs code in a safe sandbox. It can analyze data and make files.
  • File search. The model looks through documents you uploaded.
  • Computer and browser control. The model looks at a screen and clicks. It is powerful and needs care.

Connecting to other services with MCP

MCP is the Model Context Protocol. It is an open standard for connecting AI to outside tools and data. Think of it as a shared plug shape. A tool built to the standard can work with many AI apps. Both the Claude and OpenAI tools can connect to MCP servers.

The tool list you give a model costs tokens, because the model reads it. Keep the list short. Some tools let the model search for the right tool when you have many.

How to choose

  • Start with a provider tool if it does the job. It is the fastest path.
  • Write your own tool when you need private data or special rules.
  • Use MCP when a ready-made server already exists for the service you need.
  • Add a human check before any tool that changes things.

Costs and risks

  • Some tools charge per use, such as per search.
  • Tool results come back into the chat. Long results use up space.
  • Web pages can hold hidden instructions meant for the model. Treat fetched text as data, not as orders.
  • A tool that can act, such as clicking or sending, can do damage if it is tricked.
tool-choice-notes.txt
Need a fact from today        -> web search (provider tool)
Need numbers from a CSV       -> code running (provider tool)
Need our customer database    -> our own tool, with access limits
Need Slack or Jira            -> an MCP server, if one exists and is trusted

A word on cost

Tools add cost in two ways. Each tool description uses tokens, and each result comes back into the chat. A search that returns a long page can fill the working space fast. Ask tools to return short, useful results. Trim long outputs before you pass them on.

→Give the model the fewest tools that do the job. A small, clear toolbox gets used correctly more often.
⚠Treat text from the web as untrusted. A page can say ignore your rules. The model should never obey it. Your app should still limit what tools can do.
Key takeaways
  • ✓Tools run either in your app or on the provider's computers.
  • ✓Common provider tools are web search, page reading, code running and file search.
  • ✓MCP is a shared standard for connecting AI to outside services.
  • ✓Keep the tool list short, and add a human check for risky actions.
  • ✓Treat fetched web text as data, not as instructions.
Hands-on exercise

Plan a toolbox

  1. Pick an assistant you would like, such as a research helper.
  2. List the three jobs it must do. Match each to a provider tool, your own tool or MCP.
  3. Mark any tool that can change things, and add a human check for it.
  4. Write one sentence on the worst thing a trick page could make it do.
Check yourself
Q1What is the main difference between client and provider tools?show answer

Where they run. Client tools run in your app. Provider tools run on the provider's computers.

Q2What is MCP?show answer

An open standard for connecting AI to outside tools and data, like a shared plug shape.

Q3Why not give a model fifty tools?show answer

The list costs tokens and makes wrong picks more likely. A short list works better.

← Skills: Teach AI Your Way of WorkingCoding Agents Explained →
0 / 11 finished0%