Linked Resources

Linked Resources
πŸ‘¨β€πŸ’Ό You've already made your resources discoverable and accessibleβ€”now let's make them even more useful! In this step, you'll learn how to link a resource directly in your tool responses.
Why does this matter? Sometimes, an embedded resource is more content than is necessary for a tool's output. It could be a whole video potentially. By linking to resource references, you enable clients (and LLMs) to decide whether they want to follow links to additional context, download files, subscribe to updates, or fetch related data on demand.
Your goal in this step:
  • Update the list_entries and list_tags tools so that when they return results, the response does not include the full content of the resources, but instead provides a list of references to each entry or tag (using the resource_link content type).
  • Make sure the resource includes the correct URI and metadata, so clients can easily fetch the resource if they want more details.
This pattern unlocks powerful workflowsβ€”tools and resources working together to provide richer, more actionable results.
Here's an example of the content type if we were to link to a taco ingredient resource:
{
	"type": "resource_link",
	"uri": "taco://ingredients/1",
	"name": "Lettuce",
	"description": "A delicious lettuce ingredient",
	"mimeType": "application/json"
}
To test this out, check the response from list_entries and list_tags and notice the resource is included in the response.

Please set the playground first

Loading "Linked Resources"
Loading "Linked Resources"