# Server Primitives: Tools, Resources, Prompts — MCP & Agent-to-Agent Protocols

Source: https://www.geekswithgeeks.com/en/mcp-a2a/m-primitives

> Know which primitive fits which need and who controls it.

## Model-controlled, app-controlled, user-controlled

**Tools** are actions the **model** can decide to call (`tools/list`, `tools/call`): query a database, create a ticket. Each has a name, description and a JSON Schema for its input, and the result is a list of content items (text, images, structured data) with an `isError` flag. **Resources** are readable data identified by URIs (`resources/list`, `resources/read`): files, records, documents, usually selected by the **application or user**, and they can have templates and change notifications. **Prompts** are reusable templates that **users** invoke (`prompts/list`, `prompts/get`), such as a slash command that produces a well-written starting message. Choose the primitive by who should be in control: model, app or user.

## Which primitive for what

A comparison table.

```text
Primitive   Controlled by   Methods                        Example
Tool        model          tools/list, tools/call         get_order_status(order_id)
Resource    app / user     resources/list, resources/read policy://refunds (a document)
Prompt      user           prompts/list, prompts/get      /triage <ticket> template

Tool results carry content + isError. Resource and prompt names are discovered at runtime.
```

## Do not make everything a tool

Read-only reference data (policies, schemas) often fits better as a resource the app attaches, and common workflows as prompts. Fewer tools means fewer tokens and fewer wrong calls.

**Quiz:** Which primitive is meant to be invoked by the user?

- [x] Prompts
- [ ] Tools
- [ ] Roots
- [ ] Notifications

*Answer:* Prompts. Prompts are user-controlled templates, like slash commands.
