Skip to content

Set completion support to false by default #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fredericbarthelet
Copy link

@fredericbarthelet fredericbarthelet commented May 26, 2025

Change completion support default to false and use server capabilities value to assert support for completion.
Fixes #436

Motivation and Context

Current implementation always tries a first completion request on resource template or prompt usage, even if the server does not advertise support for completions. The silent error fallback currently implemented then switch back the support to false for further calls.

How Has This Been Tested?

Yes, with a server with completion, and with one without

Breaking Changes

None

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

I noticed server built using the Typescript SDK were not advertising completions support - even when they do support it - unless manually specified in the server construct arguments. I opened a PR to fix that as well to ensure completions capabilities advertising and use is more coherent. Same thing for Python SDK.

@olaservo
Copy link
Member

Thanks for this fix. If I'm understanding the typescript SDK issue correctly, it seems like typescript servers are most likely not reporting completion correctly in their capabilities? Would it make sense to wait to merge this once that fix is out so we can test with the expected state using latest sdk versus a potentially buggy one?

@fredericbarthelet
Copy link
Author

Yep, agreed, let's wait for a new TS SDK version to be published first with this fix. I'll have a quick look on other language SDK as well in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting on sdk Waiting for an SDK feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Although server doesn't support completions, inspector sends them
2 participants