# Tools, Resources and Prompts — Agent Frameworks and MCP Basics

Source: https://www.geekswithgeeks.com/en/agent-frameworks-mcp/mcp-primitives

> Know the three server primitives and who controls each.

## Who decides what runs

**Tools** are functions the model can choose to call (model-controlled), such as "create issue". **Resources** are read-only data the application can attach, such as a file or a database row (application-controlled). **Prompts** are reusable templates the user picks, such as a slash command (user-controlled). Choosing the right primitive keeps control where it belongs.

## Comparing the three

Use a tool when an action or computation is needed, a resource when you only supply data, and a prompt when the user triggers a ready-made workflow.

```text
Primitive   Controlled by   Example
Tool        the model       create_issue(title, body)
Resource    the app         file:///reports/q3.csv
Prompt      the user        /review-pull-request
```

## Do not make everything a tool

Too many tools confuse the model and use context. Expose static reference data as resources, and keep each tool small and clearly named.

**Quiz:** Which MCP primitive is chosen by the user, like a slash command?

- [ ] Tool
- [ ] Resource
- [x] Prompt
- [ ] Transport

*Answer:* Prompt. Prompts are user-invoked templates; tools are model-invoked and resources are app-attached.
