File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/core/src/integrations/mcp-server Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,12 @@ export function wrapTransportOnMessage(transport: MCPTransport): void {
78
78
export function wrapTransportSend ( transport : MCPTransport ) : void {
79
79
if ( transport . send ) {
80
80
fill ( transport , 'send' , originalSend => {
81
- return async function ( this : MCPTransport , message : unknown ) {
81
+ return async function ( this : MCPTransport , ...args : unknown [ ] ) {
82
+ const [ message ] = args ;
83
+
82
84
if ( isJsonRpcNotification ( message ) ) {
83
85
return createMcpOutgoingNotificationSpan ( message , this , ( ) => {
84
- return ( originalSend as ( ...args : unknown [ ] ) => unknown ) . call ( this , message ) ;
86
+ return ( originalSend as ( ...args : unknown [ ] ) => unknown ) . call ( this , ... args ) ;
85
87
} ) ;
86
88
}
87
89
@@ -107,7 +109,7 @@ export function wrapTransportSend(transport: MCPTransport): void {
107
109
}
108
110
}
109
111
110
- return ( originalSend as ( ...args : unknown [ ] ) => unknown ) . call ( this , message ) ;
112
+ return ( originalSend as ( ...args : unknown [ ] ) => unknown ) . call ( this , ... args ) ;
111
113
} ;
112
114
} ) ;
113
115
}
You can’t perform that action at this time.
0 commit comments