-
Notifications
You must be signed in to change notification settings - Fork 707
feature: add support ResourceTemplates to mcptest package #449
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
Conversation
""" WalkthroughThe changes extend the Changes
Assessment against linked issues
Possibly related PRs
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
mcptest/mcptest.go
(3 hunks)mcptest/mcptest_test.go
(1 hunks)
🔇 Additional comments (5)
mcptest/mcptest.go (4)
26-26
: LGTM: Field addition follows existing pattern.The addition of
resourceTemplates []ServerResourceTemplate
to the Server struct is consistent with the existing fields for tools, prompts, and resources.
110-114
: LGTM: Struct definition follows established pattern.The
ServerResourceTemplate
struct correctly combines amcp.ResourceTemplate
with its handler function, following the same pattern asServerTool
,ServerPrompt
, andServerResource
.
116-127
: LGTM: Methods follow consistent naming and implementation patterns.Both
AddResourceTemplate
andAddResourceTemplates
methods follow the established patterns used by the existingAddTool
/AddTools
,AddPrompt
/AddPrompts
, andAddResource
/AddResources
methods. The implementation is correct and consistent.
146-148
: LGTM: Template registration follows existing pattern.The resource template registration in the
Start
method correctly follows the same pattern used for registering tools, prompts, and resources with the underlying MCP server.mcptest/mcptest_test.go (1)
198-201
: Verify URI template creation approach.The JSON unmarshaling approach for creating
URITemplate
seems unusual. Please verify this is the correct way to instantiate aURITemplate
in the mcp-go library.#!/bin/bash # Search for URITemplate usage patterns in the codebase ast-grep --pattern 'URITemplate{$$$}' ast-grep --pattern '$_.UnmarshalJSON($$$)' rg -A 3 -B 3 "URITemplate"
@ezynda3 code rabbit review passed, could you run CI/CD and merge PR? |
@ezynda3 i fixed your review comments, could you approve CI/CD? |
Description
Fixes #436
Checklist
Summary by CodeRabbit
New Features
Tests