Repository navigation
Conversation
Accept an optional argument map and carry it through the existing retry driver. Name-only calls keep their original wire shape. The client guide includes a template example. Fixes modelcontextprotocol#746.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation and Context
Client#get_prompthad noarguments:keyword, so a prompt with a required argument could not be retrieved through it.It now takes an optional
arguments:Hash and sends it asparams.arguments. The params go through the existinginput_requireddriver, so a retry carries the same arguments as the first request. A call withoutarguments:sends the same params as before. The client docs page shows a call with arguments.Fixes #746
How Has This Been Tested?
test/mcp/client_test.rb: theinput_requiredtest now passes arguments and checks that both requests carry them, next to the input response and the request state. The name-only test checks that the params hold onlyname.mainwithArgumentError: unknown keyword: :arguments."Hello, Ari!", and the call without arguments still gets Invalid Params.bundle exec rakepasses on Ruby 4.0.10 (RuboCop, 2857 runs with 0 failures, and the conformance baseline).yard --no-outputpasses.Breaking Changes
None. Calls without
arguments:send the same request as before.Types of changes
Checklist