Week 2 · Lesson 3 of 20

Tools, Resources, and Prompts

0% Complete

Overview

An MCP server can expose three major feature types: tools, resources, and prompts.

Tools are executable functions. They allow the model to perform an action or calculation. Examples include retrieving a stock quote, searching for a symbol, sending an email, performing a calculation, retrieving information, updating a database record, writing to a spreadsheet, appending a row, or controlling a browser.

A tool includes information that helps the model understand what it does and how to call it. Clear descriptions and well-defined parameters make it easier for the model to select the correct tool. Constraints such as allowed formats, value ranges, and consistent return structures reduce incorrect calls and unexpected results.

Resources provide data that the client can read. They can include local files, database entries, notes, logs, contracts, meeting records, documentation, or spreadsheet contents. Resources are useful when the model needs context but should not modify the underlying information.

A resource can also preserve information created through earlier tool use. If a weather tool records each result, a log resource can expose the accumulated observations later. The model can analyze the stored information without repeatedly calling the weather service for every past observation.

Prompts are reusable templates that guide model behavior. A prompt can define a structured procedure, expected output, or recommended way to use a server. Instead of requiring every user to invent the best instruction, the server creator can provide a detailed template and ask the user only for the information that changes.

For example, a prompt for analyzing meeting content can instruct the model to extract decisions and action items and then create a report. A spreadsheet server can provide prompts for analyzing sheet data, creating a report, or moving form information into a sheet workflow. The prompt template carries the tested procedure, while the user supplies the specific sheet or task.

A SQLite server illustrates how all three features work together. Its tools can read, insert, update, and delete database information. A resource can expose a log of changes so the user has a historical record. Prompts can encode recommended ways to interact with the database.

A Google Sheets and Forms server provides another complete example. Its tools can list spreadsheets, read sheets, write data, and append data. Its resource can expose sheet contents or columns for read-only access. Its prompts can guide data analysis, report creation, and form-to-sheet workflows.

The three features should be selected according to purpose. Use a tool when the model needs to do something. Use a resource when the model needs to read context. Use a prompt when the server should provide a reusable way to perform a task.

Back to top