# MCP servers expose tools, resources, and prompts

> MCP defines three capability primitives — Tools (callable functions), Resources (readable URIs), and Prompts (reusable templates).

## Answer

MCP servers advertise three primitives: **Tools** (model-invoked functions with JSON Schema inputs), **Resources** (read-only URIs the model can fetch), and **Prompts** (parameterized prompt templates). Clients discover them via `tools/list`, `resources/list`, and `prompts/list`.

## Details

### Tools

- Declared with `name`, `description`, `inputSchema`
- Invoked via `tools/call` with `{ name, arguments }`
- Results use `content` array (`text`, `image`, or `resource` items)
- Write tool descriptions like API docstrings — they drive model selection

### Resources

- Identified by URI (e.g. `resource://docs/example` or custom schemes)
- Listed with `resources/list`, read with `resources/read`
- Optional URI templates via `resources/templates/list`

### Prompts

- Named templates with optional arguments
- Retrieved via `prompts/get` for injection into the conversation

| Primitive | Model action | Mutations |
|-----------|--------------|-----------|
| Tools | Call function | Via tool handler |
| Resources | Read data | Read-only |
| Prompts | Load template | Via prompts API |

## See also

- [[what-is-mcp]]
- [[mcp-json-rpc-format]]

## Sources

- [MCP Specification](https://spec.modelcontextprotocol.io/specification/2024-11-05/)

## Sources

- [MCP Specification 2024-11-05](https://spec.modelcontextprotocol.io/specification/2024-11-05/)