diff --git a/cli/package.json b/cli/package.json index f12600d2..bf344733 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/inspector-cli", - "version": "0.16.1", + "version": "0.16.2", "description": "CLI for the Model Context Protocol inspector", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -21,7 +21,7 @@ }, "devDependencies": {}, "dependencies": { - "@modelcontextprotocol/sdk": "^1.13.1", + "@modelcontextprotocol/sdk": "^1.17.0", "commander": "^13.1.0", "spawn-rx": "^5.1.2" } diff --git a/client/package.json b/client/package.json index 60040866..2e725a60 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/inspector-client", - "version": "0.16.1", + "version": "0.16.2", "description": "Client-side application for the Model Context Protocol inspector", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -25,7 +25,7 @@ "cleanup:e2e": "node e2e/global-teardown.js" }, "dependencies": { - "@modelcontextprotocol/sdk": "^1.14.0", + "@modelcontextprotocol/sdk": "^1.17.0", "@radix-ui/react-checkbox": "^1.1.4", "@radix-ui/react-dialog": "^1.1.3", "@radix-ui/react-icons": "^1.3.0", diff --git a/client/src/components/PromptsTab.tsx b/client/src/components/PromptsTab.tsx index 466b3d52..fa590558 100644 --- a/client/src/components/PromptsTab.tsx +++ b/client/src/components/PromptsTab.tsx @@ -48,6 +48,7 @@ const PromptsTab = ({ ref: PromptReference | ResourceReference, argName: string, value: string, + context?: Record, ) => Promise; completionsSupported: boolean; promptContent: string; @@ -73,6 +74,7 @@ const PromptsTab = ({ }, argName, value, + promptArgs, ); } }; diff --git a/client/src/components/ResourcesTab.tsx b/client/src/components/ResourcesTab.tsx index 8ec3f91b..874e0ff7 100644 --- a/client/src/components/ResourcesTab.tsx +++ b/client/src/components/ResourcesTab.tsx @@ -52,6 +52,7 @@ const ResourcesTab = ({ ref: ResourceReference | PromptReference, argName: string, value: string, + context?: Record, ) => Promise; completionsSupported: boolean; resourceContent: string; @@ -94,6 +95,7 @@ const ResourcesTab = ({ }, key, value, + templateValues, ); } }; diff --git a/client/src/lib/hooks/useCompletionState.ts b/client/src/lib/hooks/useCompletionState.ts index 71492e31..26b69a27 100644 --- a/client/src/lib/hooks/useCompletionState.ts +++ b/client/src/lib/hooks/useCompletionState.ts @@ -28,6 +28,7 @@ export function useCompletionState( ref: ResourceReference | PromptReference, argName: string, value: string, + context?: Record, signal?: AbortSignal, ) => Promise, completionsSupported: boolean = true, @@ -66,6 +67,7 @@ export function useCompletionState( ref: ResourceReference | PromptReference, argName: string, value: string, + context?: Record, ) => { if (!completionsSupported) { return; @@ -82,10 +84,15 @@ export function useCompletionState( })); try { + if (context !== undefined) { + delete context[argName]; + } + const values = await handleCompletion( ref, argName, value, + context, abortController.signal, ); @@ -97,6 +104,7 @@ export function useCompletionState( })); } } catch { + console.error("completion failed"); if (!abortController.signal.aborted) { setState((prev) => ({ ...prev, diff --git a/client/src/lib/hooks/useConnection.ts b/client/src/lib/hooks/useConnection.ts index 849eb909..edc21d92 100644 --- a/client/src/lib/hooks/useConnection.ts +++ b/client/src/lib/hooks/useConnection.ts @@ -198,6 +198,7 @@ export function useConnection({ ref: ResourceReference | PromptReference, argName: string, value: string, + context?: Record, signal?: AbortSignal, ): Promise => { if (!mcpClient || !completionsSupported) { @@ -215,6 +216,12 @@ export function useConnection({ }, }; + if (context) { + request["params"]["context"] = { + arguments: context, + }; + } + try { const response = await makeRequest(request, CompleteResultSchema, { signal, diff --git a/package-lock.json b/package-lock.json index 616e9649..589f5dcf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@modelcontextprotocol/inspector", - "version": "0.16.1", + "version": "0.16.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@modelcontextprotocol/inspector", - "version": "0.16.1", + "version": "0.16.2", "license": "MIT", "workspaces": [ "client", @@ -14,10 +14,10 @@ "cli" ], "dependencies": { - "@modelcontextprotocol/inspector-cli": "^0.16.1", - "@modelcontextprotocol/inspector-client": "^0.16.1", - "@modelcontextprotocol/inspector-server": "^0.16.1", - "@modelcontextprotocol/sdk": "^1.14.0", + "@modelcontextprotocol/inspector-cli": "^0.16.2", + "@modelcontextprotocol/inspector-client": "^0.16.2", + "@modelcontextprotocol/inspector-server": "^0.16.2", + "@modelcontextprotocol/sdk": "^1.17.0", "concurrently": "^9.0.1", "open": "^10.1.0", "shell-quote": "^1.8.2", @@ -44,10 +44,10 @@ }, "cli": { "name": "@modelcontextprotocol/inspector-cli", - "version": "0.16.1", + "version": "0.16.2", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "^1.13.1", + "@modelcontextprotocol/sdk": "^1.17.0", "commander": "^13.1.0", "spawn-rx": "^5.1.2" }, @@ -67,10 +67,10 @@ }, "client": { "name": "@modelcontextprotocol/inspector-client", - "version": "0.16.1", + "version": "0.16.2", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "^1.14.0", + "@modelcontextprotocol/sdk": "^1.17.0", "@radix-ui/react-checkbox": "^1.1.4", "@radix-ui/react-dialog": "^1.1.3", "@radix-ui/react-icons": "^1.3.0", @@ -2009,9 +2009,9 @@ "link": true }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.15.0.tgz", - "integrity": "sha512-67hnl/ROKdb03Vuu0YOr+baKTvf1/5YBHBm9KnZdjdAh8hjt4FRCPD5ucwxGB237sBpzlqQsLy1PFu7z/ekZ9Q==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.17.0.tgz", + "integrity": "sha512-qFfbWFA7r1Sd8D697L7GkTd36yqDuTkvz0KfOGkgXR8EUhQn3/EDNIR/qUdQNMT8IjmasBvHWuXeisxtXTQT2g==", "license": "MIT", "dependencies": { "ajv": "^6.12.6", @@ -10989,10 +10989,10 @@ }, "server": { "name": "@modelcontextprotocol/inspector-server", - "version": "0.16.1", + "version": "0.16.2", "license": "MIT", "dependencies": { - "@modelcontextprotocol/sdk": "^1.13.1", + "@modelcontextprotocol/sdk": "^1.17.0", "cors": "^2.8.5", "express": "^5.1.0", "ws": "^8.18.0", diff --git a/package.json b/package.json index f9461491..df2861c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/inspector", - "version": "0.16.1", + "version": "0.16.2", "description": "Model Context Protocol inspector", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -47,10 +47,10 @@ "check-version": "node scripts/check-version-consistency.js" }, "dependencies": { - "@modelcontextprotocol/inspector-cli": "^0.16.1", - "@modelcontextprotocol/inspector-client": "^0.16.1", - "@modelcontextprotocol/inspector-server": "^0.16.1", - "@modelcontextprotocol/sdk": "^1.14.0", + "@modelcontextprotocol/inspector-cli": "^0.16.2", + "@modelcontextprotocol/inspector-client": "^0.16.2", + "@modelcontextprotocol/inspector-server": "^0.16.2", + "@modelcontextprotocol/sdk": "^1.17.0", "concurrently": "^9.0.1", "open": "^10.1.0", "shell-quote": "^1.8.2", diff --git a/server/package.json b/server/package.json index 10574070..040fe71f 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/inspector-server", - "version": "0.16.1", + "version": "0.16.2", "description": "Server-side application for the Model Context Protocol inspector", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -27,7 +27,7 @@ "typescript": "^5.6.2" }, "dependencies": { - "@modelcontextprotocol/sdk": "^1.13.1", + "@modelcontextprotocol/sdk": "^1.17.0", "cors": "^2.8.5", "express": "^5.1.0", "ws": "^8.18.0",