File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
exercises/01.simple/01.problem.raw-html/worker/mcp Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import {
1313 updateTagInputSchema ,
1414} from '@epic-web/epicme-db-client/schema'
1515import { invariant } from '@epic-web/invariant'
16+ // 💰 you're gonna want this:
17+ // import { createUIResource } from '@mcp-ui/server'
1618import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js'
1719import { z } from 'zod'
1820import { type EpicMeMCP } from './index.ts'
@@ -223,6 +225,30 @@ export async function initializeTools(agent: EpicMeMCP) {
223225 } ,
224226 )
225227
228+ agent . server . registerTool (
229+ 'view_tag' ,
230+ {
231+ title : 'View Tag' ,
232+ description : 'View a tag by ID visually' ,
233+ annotations : {
234+ readOnlyHint : true ,
235+ openWorldHint : false ,
236+ } satisfies ToolAnnotations ,
237+ inputSchema : tagIdSchema ,
238+ } ,
239+ async ( { id } ) => {
240+ // 🐨 get the tag from the database
241+
242+ // 🐨 create the HTML string that displays the tag's name and description
243+ // 💯 if there's no tag, display a message saying "Tag not found"
244+
245+ return {
246+ // 🐨 use the createUIResource function to create a UI resource with the raw HTML string
247+ content : [ createText ( 'TODO...' ) ] ,
248+ }
249+ } ,
250+ )
251+
226252 agent . server . registerTool (
227253 'get_tag' ,
228254 {
You can’t perform that action at this time.
0 commit comments