# Resources and prompts

URL: /code/mcp/guides/resources-and-prompts · Id: `page:code/mcp/guides/resources-and-prompts`

> The api.sb MCP server serves records and types as resources a client can subscribe to, and every task guide the caller may run as a prompt.

Beside its three tools, the [api.sb](/code/platform/api-sb) MCP server serves resources and prompts. Resources are records and types a client reads or watches; prompts are the task guides the caller may run, each naming its [Verbs](/business/nouns/verb).

## Resources
Every record's `$id` is a resource URI. `resources/read` returns the record as `fetch` does, cut to the fields the caller's [Role](/business/nouns/role) may read.

| URI | Holds |
| --- | --- |
| `https://api.sb/{namespace}/$.d.ts` | The types of `$`, holding only the Verbs this caller may run |
| `https://api.sb/{namespace}` | The [Startup](/business/nouns/startup): its state, [Offers](/business/nouns/offer), Roles and [Systems](/business/nouns/system) |
| `https://api.sb/{namespace}/{nouns}/{id}` | One record, such as a [Subscription](/business/nouns/subscription) |
| `https://api.sb/{namespace}/actions/{id}` | One [Action](/business/nouns/action), with its status and reason |

`resources/list` returns the first two for each namespace the token reaches. A client that attaches `$.d.ts` when a session opens hands the model the complete manual of what it may do.

`leaseline.app` tracks lease renewals for property managers. An agent watching a pending refund reads the Action once:

```json
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "resources/read",
  "params": {
    "uri": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

## Subscriptions
`resources/subscribe` on a record URI sends `notifications/resources/updated` each time an [Event](/business/nouns/event) changes that record. The agent reads the record again and sees the new state; nothing polls.

```json
{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "resources/subscribe",
  "params": {
    "uri": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

An Action waiting `pending` on an [Approval](/business/nouns/approval) notifies once when the founder answers, and again when it ends. A subscription lasts as long as the session and reads under the same [Permissions](/business/nouns/permission) as `resources/read`.

## Prompts
`prompts/list` returns one prompt per task guide whose status is `live` or `beta` and whose Verbs the caller's Role may run. A guide the caller cannot run is not listed, so an agent never offers what it cannot do.

Each prompt's name is the guide's id, and its arguments are the inputs the guide needs:

```json
{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "prompts/get",
  "params": {
    "name": "take-a-payment",
    "arguments": {
      "price": "$29",
      "terms": "One-time setup fee, refundable within 14 days."
    }
  }
}
```

The result is one message: the founder's request, the Verbs in order, the one question to ask first, and each Approval to stop at. For `take-a-payment`, that is `Offer.create`, then `Offer.publish`, then the payment link.

A client shows prompts as commands, so a person in Claude types the guide's name instead of describing the task. [Docs for agents](/start/docs-for-agents) serves the same guides keyless, for reading before connecting.

## Next
- [Connect an agent](/code/mcp/guides/connect-an-agent): add the server to a client.
- [Call your first Verb](/code/mcp/guides/call-your-first-verb): `search`, `fetch` and `do`.
- [MCP spec](/code/mcp/spec): the endpoint, the tools and their input schemas.