Skip to content

Conversation

@leehack
Copy link
Owner

@leehack leehack commented Nov 10, 2025

This pull request adds explicit support for the Completions capability in accordance with the MCP 2025-06-18 specification. The changes introduce a new ServerCapabilitiesCompletions class, update the server and client logic to use this explicit capability, and provide comprehensive tests and examples to demonstrate and validate the new behavior.

Completions Capability Support:

  • Added a new ServerCapabilitiesCompletions class to represent completions-related capabilities, including an optional listChanged field. (lib/src/types.dart lib/src/types.dartR534-R553)
  • Updated the ServerCapabilities class to include a new completions field, with appropriate serialization and deserialization logic. (lib/src/types.dart [1] [2]
  • Modified the client capability check logic to require the explicit completions capability for completion-related requests, rather than inferring support from prompts or resources. (lib/src/client/client.dart lib/src/client/client.dartL152-R153)

Documentation and Examples:

  • Added an example (completions_capability_demo.dart) demonstrating how to declare and use the completions capability, including resource and prompt argument completion. (example/completions_capability_demo.dart example/completions_capability_demo.dartR1-R162)
  • Updated the README.md to mention the new Completions capability. (README.md README.mdR27)
  • Updated the CHANGELOG.md with details of the new capability and related changes. (CHANGELOG.md CHANGELOG.mdR1-R8)

Testing:

@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 46.23%. Comparing base (1f08bd5) to head (037fc3d).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
lib/src/client/client.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
+ Coverage   45.55%   46.23%   +0.68%     
==========================================
  Files          15       16       +1     
  Lines        2880     2911      +31     
==========================================
+ Hits         1312     1346      +34     
+ Misses       1568     1565       -3     
Flag Coverage Δ
unittests 46.23% <90.00%> (+0.68%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leehack leehack merged commit 7805cac into main Nov 10, 2025
5 checks passed
@leehack leehack deleted the auto-completion branch November 10, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants