mcp/server: advertise completions only if installed (#213)

Previously, completions would always be advertised as a capability even
if the CompletionHandler was not installed by the server. This CL fixes
that.
This commit is contained in:
Sam Thanawalla 2025-08-04 10:12:01 -04:00 • committed by GitHub
commit faaf77dc05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 38 additions and 36 deletions

View file

@ -58,7 +58,6 @@ code_review
"id": 2,
"result": {
"capabilities": {
"completions": {},
"logging": {},
"prompts": {
"listChanged": true

View file

@ -27,7 +27,6 @@ code_review
"id": 1,
"result": {
"capabilities": {
"completions": {},
"logging": {},
"prompts": {
"listChanged": true

View file

@ -50,7 +50,6 @@ info.txt
"id": 1,
"result": {
"capabilities": {
"completions": {},
"logging": {},
"resources": {
"listChanged": true

View file

@ -30,7 +30,6 @@ greet
"id": 1,
"result": {
"capabilities": {
"completions": {},
"logging": {},
"tools": {
"listChanged": true

View file

@ -18,7 +18,6 @@ response with its latest supported version.
"id": 1,
"result": {
"capabilities": {
"completions": {},
"logging": {}
},
"protocolVersion": "2025-06-18",

View file

@ -18,7 +18,6 @@ support.
"id": 1,
"result": {
"capabilities": {
"completions": {},
"logging": {}
},
"protocolVersion": "2024-11-05",