-
Notifications
You must be signed in to change notification settings - Fork 8
github.com/modelcontextprotocol/go-sdk #29
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
base: main
Are you sure you want to change the base?
Conversation
dimetron
commented
Nov 18, 2025
- Migrated to github.com/modelcontextprotocol/go-sdk
- Added argocd tools
Signed-off-by: Dmytro Rashko <[email protected]>
| return &mcp.CallToolResult{ | ||
| Content: []mcp.Content{&mcp.TextContent{Text: fmt.Sprintf("istioctl proxy-status failed: %v", err)}}, | ||
| IsError: true, | ||
| }, nil |
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.
should we return error here too, instead nil?
| namespace := "" | ||
| configType := "all" | ||
|
|
||
| if val, ok := args["pod_name"].(string); ok { |
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.
nit: I'd extract this functionality into a separate function - something like:
func getValueOrDefault(args map[string]interface{}, field string) string {
if val, ok := args[field].(string); ok {
return val
}
return ""
}
| namespace = val | ||
| } | ||
| if val, ok := args["all_namespaces"].(string); ok { | ||
| allNamespaces = val == "true" |
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.
should the val be transformed to lower case and then compared?
EItanya
left a comment
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.
Leaving the partial review as this PR is quite large. Spoke offline about switching tool function definitions to use generics
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.
Why do we need this test? I think it should be the responsibility of the upstream library to test this. Maintaining this on our side seems unnecessary
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.
Same question about testing core mcp library functionality.
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.
So I understand what you are trying to do here, but I think running the built binary adds an unnecessary level of complexity to the test. Why can't we just use the server object from this repo, and the official mcp-go client?
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.
I don't think we need 4 separate tests for this, since this is an integration test I think we can just test all in one
- Launch
- init
- List
- Call
| ) | ||
|
|
||
| // StdioTestServer represents a server instance for stdio transport testing | ||
| type StdioTestServer struct { |
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.
This type seems to be functionally equivalent to the ComprehensiveTestServer, can we re-use that? Also same question about using the mcp-go client instead of recreating all of that logic here again