mcp: uncomment test, change struct{} to any (#341)

Address comments on #325.
This commit is contained in:
Jonathan Amsterdam 2025-08-21 10:18:52 -04:00 • committed by GitHub
commit 5b1f328fd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,7 +60,7 @@ func TestStreamableTransports(t *testing.T) {
return nil, nil, nil
}
AddTool(server, &Tool{Name: "hang"}, hang)
AddTool(server, &Tool{Name: "sample"}, func(ctx context.Context, req *ServerRequest[*CallToolParams], args map[string]any) (*CallToolResult, any, error) {
AddTool(server, &Tool{Name: "sample"}, func(ctx context.Context, req *ServerRequest[*CallToolParams], args any) (*CallToolResult, any, error) {
// Test that we can make sampling requests during tool handling.
//
// Try this on both the request context and a background context, so