diff --git a/client/src/components/ToolsTab.tsx b/client/src/components/ToolsTab.tsx index fcd3ffbd..2eb682e5 100644 --- a/client/src/components/ToolsTab.tsx +++ b/client/src/components/ToolsTab.tsx @@ -19,6 +19,10 @@ import ListPane from "./ListPane"; import JsonView from "./JsonView"; import ToolResults from "./ToolResults"; +// Type guard to safely detect the optional _meta field without using `any` +const hasMeta = (tool: Tool): tool is Tool & { _meta: unknown } => + typeof (tool as { _meta?: unknown })._meta !== "undefined"; + const ToolsTab = ({ tools, listTools, @@ -246,38 +250,40 @@ const ToolsTab = ({ )} - {selectedTool && (selectedTool as any)._meta && ( -