File tree Expand file tree Collapse file tree 2 files changed +7
-17
lines changed Expand file tree Collapse file tree 2 files changed +7
-17
lines changed Original file line number Diff line number Diff line change 1
1
import { Client } from "@modelcontextprotocol/sdk/client/index.js" ;
2
2
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js" ;
3
3
import {
4
+ CallToolResult ,
5
+ CallToolResultSchema ,
4
6
ClientNotification ,
5
7
ClientRequest ,
6
- CompatibilityCallToolResult ,
7
- CompatibilityCallToolResultSchema ,
8
8
CreateMessageRequestSchema ,
9
9
CreateMessageResult ,
10
10
EmptyResultSchema ,
@@ -75,7 +75,7 @@ const App = () => {
75
75
const [ promptContent , setPromptContent ] = useState < string > ( "" ) ;
76
76
const [ tools , setTools ] = useState < Tool [ ] > ( [ ] ) ;
77
77
const [ toolResult , setToolResult ] =
78
- useState < CompatibilityCallToolResult | null > ( null ) ;
78
+ useState < CallToolResult | null > ( null ) ;
79
79
const [ errors , setErrors ] = useState < Record < string , string | null > > ( {
80
80
resources : null ,
81
81
prompts : null ,
@@ -382,7 +382,7 @@ const App = () => {
382
382
} ,
383
383
} ,
384
384
} ,
385
- CompatibilityCallToolResultSchema ,
385
+ CallToolResultSchema ,
386
386
"tools" ,
387
387
) ;
388
388
setToolResult ( response ) ;
Original file line number Diff line number Diff line change @@ -8,13 +8,12 @@ import {
8
8
ListToolsResult ,
9
9
Tool ,
10
10
CallToolResultSchema ,
11
+ CallToolResult ,
11
12
} from "@modelcontextprotocol/sdk/types.js" ;
12
13
import { AlertCircle , Send } from "lucide-react" ;
13
14
import { useState } from "react" ;
14
15
import ListPane from "./ListPane" ;
15
16
16
- import { CompatibilityCallToolResult } from "@modelcontextprotocol/sdk/types.js" ;
17
-
18
17
const ToolsTab = ( {
19
18
tools,
20
19
listTools,
@@ -32,7 +31,7 @@ const ToolsTab = ({
32
31
callTool : ( name : string , params : Record < string , unknown > ) => void ;
33
32
selectedTool : Tool | null ;
34
33
setSelectedTool : ( tool : Tool ) => void ;
35
- toolResult : CompatibilityCallToolResult | null ;
34
+ toolResult : CallToolResult | null ;
36
35
nextCursor : ListToolsResult [ "nextCursor" ] ;
37
36
error : string | null ;
38
37
} ) => {
@@ -93,16 +92,7 @@ const ToolsTab = ({
93
92
) ) }
94
93
</ >
95
94
) ;
96
- } else if ( "toolResult" in toolResult ) {
97
- return (
98
- < >
99
- < h4 className = "font-semibold mb-2" > Tool Result (Legacy):</ h4 >
100
- < pre className = "bg-gray-50 p-4 rounded text-sm overflow-auto max-h-64" >
101
- { JSON . stringify ( toolResult . toolResult , null , 2 ) }
102
- </ pre >
103
- </ >
104
- ) ;
105
- }
95
+ } ;
106
96
} ;
107
97
108
98
return (
You can’t perform that action at this time.
0 commit comments