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 {
7878export function wrapTransportSend ( transport : MCPTransport ) : void {
7979 if ( transport . send ) {
8080 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+
8284 if ( isJsonRpcNotification ( message ) ) {
8385 return createMcpOutgoingNotificationSpan ( message , this , ( ) => {
84- return ( originalSend as ( ...args : unknown [ ] ) => unknown ) . call ( this , message ) ;
86+ return ( originalSend as ( ...args : unknown [ ] ) => unknown ) . call ( this , ... args ) ;
8587 } ) ;
8688 }
8789
@@ -107,7 +109,7 @@ export function wrapTransportSend(transport: MCPTransport): void {
107109 }
108110 }
109111
110- return ( originalSend as ( ...args : unknown [ ] ) => unknown ) . call ( this , message ) ;
112+ return ( originalSend as ( ...args : unknown [ ] ) => unknown ) . call ( this , ... args ) ;
111113 } ;
112114 } ) ;
113115 }
You can’t perform that action at this time.
0 commit comments