Conversation
Allow tool handlers to return structured JSON data alongside text content via the new StructuredContent field in ToolCallResult. This enables MCP Apps to consume typed data for rich UI rendering while maintaining backward compatibility with existing text-only responses. - Add StructuredContent field to ToolCallResult - Add NewToolCallResultWithStructuredContent constructor - Add NewTextResultWithStructuredContent in the MCP layer - Bridge StructuredContent through the Go SDK handler Co-authored-by: Cursor <cursoragent@cursor.com>
Test the new constructors and MCP result functions: - NewToolCallResultWithStructuredContent in pkg/api - NewTextResultWithStructuredContent in pkg/mcp - Verify structured content is omitted when nil - Verify error results ignore structured content Co-authored-by: Cursor <cursoragent@cursor.com>
Allow tool definitions to carry a _meta map, which the MCP Apps spec uses for ui.resourceUri to link a tool to its UI resource. The field is omitted from JSON serialization when nil. - Add Meta map[string]any field with json:"_meta,omitempty" to Tool struct - Pass Meta through to Go SDK tool in ServerToolToGoSdkTool - Add JSON serialization tests for the _meta field Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce the MCP App resource serving infrastructure and the first concrete UI app - a Pods Resource Usage dashboard for the pods_top tool. MCP App framework: - Add mcp-app/ directory with Go embed, Vite build system, and vite-plugin-singlefile to produce self-contained HTML files - Register embedded HTML resources via MCP Resources capability - Add mcpapp package with AppResource type, ToolMeta helper, and resource registry Pods Top UI: - TypeScript/HTML dashboard using @modelcontextprotocol/ext-apps SDK - Sortable table with CPU/memory bar charts, dark/light theme support - Refresh button to re-invoke pods_top tool - Return structured content from pods_top alongside text output - Link pods_top tool to its UI via _meta.ui.resourceUri Build system: - Add build-mcp-app Makefile target - Add it as dependency of the build target Co-authored-by: Cursor <cursoragent@cursor.com>
|
@onmete: This pull request references OLS-2568 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: onmete The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@onmete: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@onmete: This pull request references OLS-2568 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Draft with example UI resource for
pods_toptool - feel free to closePurpose: Introduce the MCP App resource serving infrastructure and the first concrete UI app -- a Pods Resource Usage dashboard for
pods_top.Rebase after:
#141
#142
Files changed:
mcp-app/**mcpapp.go-- Goembedpackage withAppResourcetype,ToolMeta()helper,Resources()registry, embeddeddist/pods-top-app.htmlpackage.json,tsconfig.json,vite.config.ts-- Node.js build tooling using Vite +vite-plugin-singlefileto produce a single self-contained HTML filepods-top-app.html-- HTML template with CSS for the dashboardsrc/pods-top-app.ts-- TypeScript source using@modelcontextprotocol/ext-appsSDK for sorting, formatting, refresh, and dark/light theme supportdist/pods-top-app.html-- Built artifact (should NOT be committed; it should be.gitignored or built in CI)Resourcescapability (&mcp.ResourceCapabilities{}), addregisterMCPAppResources()method, importmcpapppackagepodsTopContainerMetric/podsTopPodMetricstructs, return structured content frompodsTop(), setMetawith UI resource URI onpods_toptool definitionbuild-mcp-apptarget, add it as dependency ofbuild_meta.ui.resourceUritopods_toptool definition