@@ -3,7 +3,7 @@ import { Button } from "@/components/ui/button";
33import { Input } from "@/components/ui/input" ;
44import { Label } from "@/components/ui/label" ;
55import { TabsContent } from "@/components/ui/tabs" ;
6- import { ListToolsResult , Tool } from "@modelcontextprotocol/sdk/types.js" ;
6+ import { CallToolResult , ListToolsResult , Tool } from "@modelcontextprotocol/sdk/types.js" ;
77import { AlertCircle , Send } from "lucide-react" ;
88import { useState } from "react" ;
99import ListPane from "./ListPane" ;
@@ -35,12 +35,14 @@ const ToolsTab = ({
3535 if ( ! toolResult ) return null ;
3636
3737 if ( "content" in toolResult ) {
38+ const structuredResult = toolResult as CallToolResult ;
39+
3840 return (
3941 < >
4042 < h4 className = "font-semibold mb-2" >
41- Tool Result: { toolResult . isError ? "Error" : "Success" }
43+ Tool Result: { structuredResult . isError ? "Error" : "Success" }
4244 </ h4 >
43- { toolResult . content . map ( ( item , index ) => (
45+ { structuredResult . content . map ( ( item , index ) => (
4446 < div key = { index } className = "mb-2" >
4547 { item . type === "text" && (
4648 < pre className = "bg-gray-50 p-4 rounded text-sm overflow-auto max-h-64" >
0 commit comments