From 5dd661513bbc641422a491646ccf0d1210336287 Mon Sep 17 00:00:00 2001 From: Eric Horacek Date: Sun, 13 Jul 2025 14:33:39 -0700 Subject: [PATCH 1/2] feat: Add _meta field support to tool UI Shows [_meta](https://modelcontextprotocol.io/specification/2025-06-18/basic/index#meta) fields if present when listing and calling tools --- client/src/components/ToolResults.tsx | 8 ++ client/src/components/ToolsTab.tsx | 33 ++++++++ .../components/__tests__/ToolsTab.test.tsx | 81 +++++++++++++++++++ 3 files changed, 122 insertions(+) diff --git a/client/src/components/ToolResults.tsx b/client/src/components/ToolResults.tsx index a3cecf55..6479b5fb 100644 --- a/client/src/components/ToolResults.tsx +++ b/client/src/components/ToolResults.tsx @@ -154,6 +154,14 @@ const ToolResults = ({ )} + {structuredResult._meta && ( +
+
Meta:
+
+ +
+
+ )} {!structuredResult.structuredContent && validationResult && !validationResult.isValid && ( diff --git a/client/src/components/ToolsTab.tsx b/client/src/components/ToolsTab.tsx index 3c7db84e..fcd3ffbd 100644 --- a/client/src/components/ToolsTab.tsx +++ b/client/src/components/ToolsTab.tsx @@ -46,6 +46,7 @@ const ToolsTab = ({ const [params, setParams] = useState>({}); const [isToolRunning, setIsToolRunning] = useState(false); const [isOutputSchemaExpanded, setIsOutputSchemaExpanded] = useState(false); + const [isMetaExpanded, setIsMetaExpanded] = useState(false); useEffect(() => { const params = Object.entries( @@ -245,6 +246,38 @@ const ToolsTab = ({ )} + {selectedTool && (selectedTool as any)._meta && ( +
+
+

Meta:

+ +
+
+ +
+
+ )} + +
- {isMetaExpanded ? ( - <> - - Collapse - - ) : ( - <> - - Expand - - )} - + +
-
- -
- - )} + )}