MCP Tool vs MCP Resource
People often think MCP tools and resources are two names for the same thing. A tool is an action, and the model decides when to call it. A resource is data to read, and the app or the user decides when to load it. If something only needs to be read, make it a resource. Keep tools for things that act.
MCP Tool
An action an MCP server lets the model call, like a search.
An MCP tool is an action that a server lets the model call, such as sending an email or running a search. Each tool has a name, a description and a schema that lists its inputs. The client asks the server for its tools and hands them to the model. When the model calls one, the server runs it and returns the result. Tools are controlled by the model, so hosts often ask the user before a risky one runs.
MCP Resource
Data an MCP server lets the app read, like a file. The app picks it.
An MCP resource is a piece of data that a server makes available to read, such as a file, a database table or a web page. Each resource has an address, called a URI, and a type, such as text or an image. Resources are controlled by the app, not the model. The app or the user picks which ones to load into the model's context. A server can also tell the client when a resource has changed.
In one line
- MCP Tool
- An action an MCP server lets the model call, like a search.
- MCP Resource
- Data an MCP server lets the app read, like a file. The app picks it.