We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b79b6f commit aecfa21Copy full SHA for aecfa21
client/src/components/ToolsTab.tsx
@@ -8,6 +8,7 @@ import {
8
CallToolResult,
9
ListToolsResult,
10
Tool,
11
+ CallToolResultSchema,
12
} from "@modelcontextprotocol/sdk/types.js";
13
import { AlertCircle, Send } from "lucide-react";
14
import { useState } from "react";
@@ -40,7 +41,7 @@ const ToolsTab = ({
40
41
if (!toolResult) return null;
42
43
if ("content" in toolResult) {
- const structuredResult = toolResult as CallToolResult;
44
+ const structuredResult = CallToolResultSchema.parse(toolResult);
45
const isError = structuredResult.isError ?? false;
46
47
return (
0 commit comments