Skip to content

Commit 2d9e527

Browse files
committed
Removed references to CompatibilityCallToolResult - the latest TypeScript SDK has removed it.
I have removed the Tool (Legacy) rendering as a consequence - as SDK no longer has compatible types.
1 parent 77f0e1c commit 2d9e527

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

client/src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
22
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
33
import {
4+
CallToolResult,
5+
CallToolResultSchema,
46
ClientNotification,
57
ClientRequest,
6-
CompatibilityCallToolResult,
7-
CompatibilityCallToolResultSchema,
88
CreateMessageRequestSchema,
99
CreateMessageResult,
1010
EmptyResultSchema,
@@ -75,7 +75,7 @@ const App = () => {
7575
const [promptContent, setPromptContent] = useState<string>("");
7676
const [tools, setTools] = useState<Tool[]>([]);
7777
const [toolResult, setToolResult] =
78-
useState<CompatibilityCallToolResult | null>(null);
78+
useState<CallToolResult | null>(null);
7979
const [errors, setErrors] = useState<Record<string, string | null>>({
8080
resources: null,
8181
prompts: null,
@@ -382,7 +382,7 @@ const App = () => {
382382
},
383383
},
384384
},
385-
CompatibilityCallToolResultSchema,
385+
CallToolResultSchema,
386386
"tools",
387387
);
388388
setToolResult(response);

client/src/components/ToolsTab.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ import {
88
ListToolsResult,
99
Tool,
1010
CallToolResultSchema,
11+
CallToolResult,
1112
} from "@modelcontextprotocol/sdk/types.js";
1213
import { AlertCircle, Send } from "lucide-react";
1314
import { useState } from "react";
1415
import ListPane from "./ListPane";
1516

16-
import { CompatibilityCallToolResult } from "@modelcontextprotocol/sdk/types.js";
17-
1817
const ToolsTab = ({
1918
tools,
2019
listTools,
@@ -32,7 +31,7 @@ const ToolsTab = ({
3231
callTool: (name: string, params: Record<string, unknown>) => void;
3332
selectedTool: Tool | null;
3433
setSelectedTool: (tool: Tool) => void;
35-
toolResult: CompatibilityCallToolResult | null;
34+
toolResult: CallToolResult | null;
3635
nextCursor: ListToolsResult["nextCursor"];
3736
error: string | null;
3837
}) => {
@@ -93,16 +92,7 @@ const ToolsTab = ({
9392
))}
9493
</>
9594
);
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+
};
10696
};
10797

10898
return (

0 commit comments

Comments
 (0)