|
1 | 1 | # Resources |
2 | 2 |
|
3 | | -👨💼 Our users really want to know who's responsible for building this amazing |
4 | | -app! (That's you!). In this step, you'll take your first step toward exposing |
5 | | -structured data from your server—not just as tool responses, but as first-class |
6 | | -resources that clients can discover and read. |
| 3 | +👨💼 Our users really want to include their tags in the context as they write |
| 4 | +their journal entries. They could just ask the LLM to run the `list_tags` tool, |
| 5 | +but that's not as efficient. In fact, the host application they're using could |
| 6 | +proactively request the resources we expose without any input from the user as |
| 7 | +well. Making it both efficient and convenient for the user. |
| 8 | + |
| 9 | +In this step, you'll take your first step toward exposing structured data from |
| 10 | +your server—not just as tool responses, but as first-class resources that |
| 11 | +clients can discover and read. |
7 | 12 |
|
8 | 13 | Your goal: |
9 | 14 |
|
10 | 15 | - Declare the `resources` capability on your server. |
11 | | -- Register a simple resource called "credits" that provides information about |
12 | | - the creator of the app. This resource should be available at the URI |
13 | | - `epicme://credits` and return a plain text string with the username of the app's |
14 | | - creator. |
| 16 | +- Register a simple resource called "tags" that provides information about all |
| 17 | + the tags in the database. This resource should be available at the URI |
| 18 | + `epicme://tags` and return a JSON array of tags. |
15 | 19 |
|
16 | 20 | This is your first taste of the MCP resources system. No need for dynamic |
17 | 21 | templates or database integration yet—just get a static resource registered and |
|
0 commit comments