Today

MCP tools, resources and prompts

Tools

A tool is an action with a name and inputs, such as 'search issues' or 'send message'. The model picks a tool and the app runs it. Tools can change things, so apps usually ask you first.

Resources

A resource is data to read, such as a file, a database row or a web page. It gives the model context without taking any action.

Prompts

A prompt is a saved, reusable instruction with blanks to fill, such as 'review this code'. The user usually picks it, often from a menu.

Key takeaways

  • Tools act, resources inform, prompts guide.
  • Tools are chosen by the model, prompts by the user.
  • Good tool names and descriptions help the model choose well.

Quick questions

What is the difference between a tool and a resource?

A tool performs an action. A resource only provides data to read.

Is this the same as function calling?

It is similar. Function calling lets a model request a function. MCP adds a shared standard for finding and connecting those functions across apps.

Can a server offer all three?

Yes, but many offer only tools.

Keep learning