-
Notifications
You must be signed in to change notification settings - Fork 680
Feedback on McpClient NO MERGE #1001
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| ModelContextProtocol.Protocol.Implementation name is too generic. Lots of things in this namespace named poorly. That might be OK if users don't have to deal with them, but it looks like they do. | ||
|
|
||
|
|
||
| ModelClient.CompleteAsync - naming seems off. Maybe "GetCompletion" | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
|
|
||
|
|
||
| static ModelClient.CreateSamplingHandler - why is this factory method on ModelClient??? Maybe should be an extension method. | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
|
|
||
|
|
||
| ModelClient - Enumerate\* vs List\* - why have these redundant methods that return the same thing just one wrapping. Can we just return IAE and have folks materialize that? | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
|
|
||
|
|
||
| ModelClient.EnumerateToolsAsync - why accept JsonSerializerOptions on this call, it doesn't feel like something tied to enumerating tools. Would it make more sense to make this a property on the client? | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
|
|
||
|
|
||
| SetLoggingLevel(LogLevel, CancellationToken) vs SetLoggingLevel(LoggingLevel, CancellationToken) -- WHY? Don't make these overloads, instead choose one then make conversions on the types. | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
|
|
||
|
|
||
| SubscribeToResourceAsync - how are the notifications delivered? This method confused me as I don't understand what it's supposed to do. Might just need to research more. | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
|
|
||
| TextContentBlock doesn't override ToString -- to get any of the data returned I need to get at protocol types, which feels wrong since those are all "raw" and not designed surface area. | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
| Same is true for TextResourceContents. The entire content model seems pretty rough - might be better to unify on MEAI content types. | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
|
|
||
|
|
||
| Odd that ResourceContents is plural, but ContentBlock is not. Why do we even need to different sets of types for these? | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
|
|
||
|
|
||
| Similarly ReadResourceResult has Contents, while CallToolResult has Content, but both are ILists. | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
|
|
||
|
|
||
| BlobResourceContents exposes content as a normal string, which means it encoded the UTF-8 to a string, creating work for GC. Instead it should keep the UTF8 contents, and lazily decode that from base64 UTF8 to bytes (either as stream, or byte array). The same problem exists with ContentBlock types, where base-64 data is exposed as Unicode strings. | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
|
|
||
| Prompts expose arguments as types, whereas tools expose arguments as json schema. | ||
|
ericstj marked this conversation as resolved.
|
||
|
|
||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.