feat: Implement MCP Completion (prompt argument only), add tests and examples - #27
Open
shenyv1 wants to merge 1 commit into
Open
feat: Implement MCP Completion (prompt argument only), add tests and examples#27shenyv1 wants to merge 1 commit into
shenyv1 wants to merge 1 commit into
Conversation
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.
Implements 【腾讯犀牛鸟计划】tRPC-MCP-Go Completion功能 #19
This pull request partially addresses Issue #19.
Main changes:
• Add support for the completion/complete method, enabling intelligent completion suggestions for prompt arguments (ref/prompt type).
• Extend the core client (client.go) to support the CompletionComplete method.
• Enhance manager_prompt.go and mcp_prompts.go to handle completion requests and define related data structures.
• Add RegisterPromptWithCompletion to the server, allowing registration of prompts with completion handlers.
• Add comprehensive unit tests in completion_prompt_test.go to cover normal, error, and fallback scenarios for prompt completion.
• Provide full client and server examples (examples/completion_example/) demonstrating how to use the completion feature in real applications.
• Minor updates to lifecycle, utils, and server integration to support the new feature.
Note:
This PR implements intelligent completion for prompt arguments only. Resource URI completion is not included in this update.
Next Steps:
The resource URI completion functionality will be delivered in a follow-up PR, completing the full scope of Issue #19.