-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Controlling Context in Client for Sampling Requests #1205
Copy link
Copy link
Open
Labels
P1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featuredocumentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomersready for workEnough information for someone to start working onEnough information for someone to start working on
Metadata
Metadata
Assignees
Labels
P1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featuredocumentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomersready for workEnough information for someone to start working onEnough information for someone to start working on
Question
I am exploring the
samplingcomponents in MCP. Based on my understanding of the protocol, this should allow the server to utilise the LLM(s) available on the client side. Unfortunately, none of the examples provide a working demonstration of this.I have managed to get something working here, but I had to invoke the LLM directly using only part of the information from the
CreateMessageRequestParamsobject. I have not been able to determine the purpose ofRequestContextor how it can be leveraged.In summary, these are my questions:
modelPreferencesto suggest that the client changes the choice of LLM based on priorities or name hints?RequestContextto pass available context to the LLM for improved generation?includeContextattribute ofCreateMessageRequestParamsto filter what information is included in the context?Any guidance or examples would be greatly appreciated.
Additional Context
1.12.23.13.5