Skip to content

Commit ecff01b

Browse files
committed
improve instructions
1 parent 8c4e97d commit ecff01b

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

exercises/03.resources/01.problem.simple/README.mdx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# Resources
22

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.
712

813
Your goal:
914

1015
- 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.
1519

1620
This is your first taste of the MCP resources system. No need for dynamic
1721
templates or database integration yet—just get a static resource registered and

exercises/03.resources/02.problem.template/README.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ Notice how the `list` callback queries the database and returns a resource
4848
listing for each name. This pattern is exactly what you'll use to expose entries
4949
and tags from your own database.
5050

51+
<callout-success>
52+
The reason for the `list` callback is to make it easy for clients to get a
53+
list of available resources without having to know the exact URIs and without
54+
having to request the entire resource (notice we only return the name, URI,
55+
and type in the `list` callback).
56+
</callout-success>
57+
5158
Your goal in this step:
5259

5360
- Use resource templates to expose entries and tags from your database, each

0 commit comments

Comments
 (0)