Skip to content

[#77] Added sampling support to tools#115

Merged
QuantGeekDev merged 1 commit intoQuantGeekDev:mainfrom
oenic:pr/sampling
Apr 1, 2026
Merged

[#77] Added sampling support to tools#115
QuantGeekDev merged 1 commit intoQuantGeekDev:mainfrom
oenic:pr/sampling

Conversation

@oenic
Copy link
Copy Markdown

@oenic oenic commented Jun 19, 2025

I added a simple passthrough function to the underlying mcp sdk createMessage function to allow for sampling requests from tools.

The server is now injected into the tools at startup, which allows this.

I wrote some unit tests and I also packed the project and tested manually using VSCode's copilot agent mode. All appears to work there.

@oenic oenic mentioned this pull request Jun 19, 2025
@oenic oenic changed the title Added sampling support to tools [#77] Added sampling support to tools Jun 19, 2025
Enables tools to request LLM completions via the MCP sampling protocol
(sampling/createMessage). The SDK Server instance is injected into tools
at startup, allowing tools to call this.samplingRequest() from execute().

Aligned with MCP specification 2025-11-25.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@QuantGeekDev QuantGeekDev merged commit 3221a83 into QuantGeekDev:main Apr 1, 2026
@QuantGeekDev
Copy link
Copy Markdown
Owner

@oenic Thank you for your contribution <3

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