Title: Return empty completion when no handler matches a valid ref by jstar0 · Pull Request #996 · modelcontextprotocol/java-sdk · GitHub
Open Graph Title: Return empty completion when no handler matches a valid ref by jstar0 · Pull Request #996 · modelcontextprotocol/java-sdk
X Title: Return empty completion when no handler matches a valid ref by jstar0 · Pull Request #996 · modelcontextprotocol/java-sdk
Description: Return empty completion when no handler matches a valid ref Fixes #991. Summary completion/complete currently returns -32602 when a prompt or resource template exists and the requested argument is valid, but no completion handler is registered for that specific reference. In that case there are simply no suggestions to return. Changes Return an empty completion result for valid prompt/resource-template completion requests when no matching completion handler exists. Keep prompt/resource existence checks and argument validation before the completion-handler lookup, so unknown refs and invalid arguments keep their existing error behavior. Add stateful and stateless integration coverage for prompt and resource-template no-handler completions. Verification ./mvnw -pl mcp-core -am test ./mvnw -pl mcp-test -am -Dtest=McpCompletionTests,HttpServletStatelessIntegrationTests#testCompletionShouldReturnExpectedSuggestions+testCompletionWithoutMatchingHandlerReturnsEmptyResult+testResourceTemplateCompletionWithoutMatchingHandlerReturnsEmptyResult -Dsurefire.failIfNoSpecifiedTests=false test
Open Graph Description: Return empty completion when no handler matches a valid ref Fixes #991. Summary completion/complete currently returns -32602 when a prompt or resource template exists and the requested argument is ...
X Description: Return empty completion when no handler matches a valid ref Fixes #991. Summary completion/complete currently returns -32602 when a prompt or resource template exists and the requested argument is ...
Opengraph URL: https://github.com/modelcontextprotocol/java-sdk/pull/996
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d0938fcd-119e-b502-7c9e-8083b237200e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 96B0:2C32F8:F06F7:135C9E:6A5BE69D |
| html-safe-nonce | 7d3b459617c4884d91981dec64574029fce0443fb05f9ec50ba9ce1a35e9b9d7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkIwOjJDMzJGODpGMDZGNzoxMzVDOUU6NkE1QkU2OUQiLCJ2aXNpdG9yX2lkIjoiNzk0MDU2NDY0OTkxNzUzOTk5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d6d3d612fdad977ee08bebf5104f35680eb6b93d8c5a06269c43b6d51113b84d |
| hovercard-subject-tag | pull_request:3800747473 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/java-sdk/pull/996/files |
| twitter:image | https://avatars.githubusercontent.com/u/54024410?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/54024410?s=400&v=4 |
| og:image:alt | Return empty completion when no handler matches a valid ref Fixes #991. Summary completion/complete currently returns -32602 when a prompt or resource template exists and the requested argument is ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/java-sdk git https://github.com/modelcontextprotocol/java-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 919609219 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/java-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 919609219 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/java-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width