Upgrade to SDK 0.5.0
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "*",
|
||||
"@modelcontextprotocol/sdk": "0.5.0",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"@radix-ui/react-label": "^2.1.0",
|
||||
"@radix-ui/react-select": "^2.1.2",
|
||||
|
||||
@@ -357,10 +357,21 @@ const App = () => {
|
||||
|
||||
const connectMcpServer = async () => {
|
||||
try {
|
||||
const client = new Client({
|
||||
name: "mcp-inspector",
|
||||
version: "0.0.1",
|
||||
});
|
||||
const client = new Client(
|
||||
{
|
||||
name: "mcp-inspector",
|
||||
version: "0.0.1",
|
||||
},
|
||||
{
|
||||
capabilities: {
|
||||
// Support all client capabilities since we're an inspector tool
|
||||
sampling: {},
|
||||
roots: {
|
||||
listChanged: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
const backendUrl = new URL("http://localhost:3000/sse");
|
||||
|
||||
|
||||
@@ -41,11 +41,12 @@ const ToolsTab = ({
|
||||
|
||||
if ("content" in toolResult) {
|
||||
const structuredResult = toolResult as CallToolResult;
|
||||
const isError = structuredResult.isError ?? false;
|
||||
|
||||
return (
|
||||
<>
|
||||
<h4 className="font-semibold mb-2">
|
||||
Tool Result: {structuredResult.isError ? "Error" : "Success"}
|
||||
Tool Result: {isError ? "Error" : "Success"}
|
||||
</h4>
|
||||
{structuredResult.content.map((item, index) => (
|
||||
<div key={index} className="mb-2">
|
||||
|
||||
Reference in New Issue
Block a user