@@ -15,6 +15,37 @@ import (
1515 "github.com/shurcooL/githubv4"
1616)
1717
18+ // GetMeUIResourceURI is the URI for the get_me tool's MCP App UI resource.
19+ const GetMeUIResourceURI = "ui://github-mcp-server/get-me"
20+
21+ // GetMeUIHTML is the HTML content for the get_me tool's MCP App UI.
22+ // This is a simple "Hello World" demo with bold red text.
23+ const GetMeUIHTML = `<!DOCTYPE html>
24+ <html lang="en">
25+ <head>
26+ <meta charset="UTF-8">
27+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
28+ <title>GitHub MCP Server - Get Me</title>
29+ <style>
30+ body {
31+ font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
32+ padding: 20px;
33+ margin: 0;
34+ background: var(--color-background-primary, #fff);
35+ color: var(--color-text-primary, #333);
36+ }
37+ .hello-world {
38+ font-weight: bold;
39+ color: red;
40+ font-size: 1.5em;
41+ }
42+ </style>
43+ </head>
44+ <body>
45+ <p class="hello-world">Hello World</p>
46+ </body>
47+ </html>`
48+
1849// UserDetails contains additional fields about a GitHub user not already
1950// present in MinimalUser. Used by get_me context tool but omitted from search_users.
2051type UserDetails struct {
@@ -51,6 +82,12 @@ func GetMe(t translations.TranslationHelperFunc) inventory.ServerTool {
5182 // Use json.RawMessage to ensure "properties" is included even when empty.
5283 // OpenAI strict mode requires the properties field to be present.
5384 InputSchema : json .RawMessage (`{"type":"object","properties":{}}` ),
85+ // MCP Apps UI metadata - links this tool to its UI resource
86+ Meta : mcp.Meta {
87+ "ui" : map [string ]any {
88+ "resourceUri" : GetMeUIResourceURI ,
89+ },
90+ },
5491 },
5592 nil ,
5693 func (ctx context.Context , deps ToolDependencies , _ * mcp.CallToolRequest , _ map [string ]any ) (* mcp.CallToolResult , any , error ) {
0 commit comments