Resources

Loading "Resources"
πŸ‘¨β€πŸ’Ό Our users really want to include their tags in the context as they write their journal entries. They could just ask the LLM to run the list_tags tool, but that's not as efficient. In fact, the host application they're using could proactively request the resources we expose without any input from the user as well. Making it both efficient and convenient for the user.
In this step, you'll take your first step toward exposing structured data from your serverβ€”not just as tool responses, but as first-class resources that clients can discover and read.

Your challenge

  • Declare the resources capability on your server.
  • Register a simple resource called "tags" that provides information about all the tags in the database. This resource should be available at the URI epicme://tags and return a JSON array of tags.
This is your first taste of the MCP resources system. No need for dynamic templates or database integration yetβ€”just get a static resource registered and returning a simple value.

An example

Use this example as a reference to complete this challenge.
agent.server.registerResource(
	'hello',
	'hello://world',
	{
		title: 'Hello',
		description: 'A simple hello world resource',
	},
	async (uri) => {
		return {
			contents: [
				{
					mimeType: 'text/plain',
					text: 'Hello, world!',
					uri: uri.toString(),
				},
			],
		}
	},
)

Please set the playground first

Loading "Resources"
Loading "Resources"

Access Denied

You must login or register for the workshop to view the diff.

Check out this video to see how the diff tab works.