(method: string, params?: unknown)
| 306 | } |
| 307 | |
| 308 | private notify(method: string, params?: unknown): void { |
| 309 | const notif: JsonRpcNotification = { jsonrpc: '2.0', method, params }; |
| 310 | this.send(notif).catch(e => logger.warn(`MCP ${this.name} notify failed`, { method, err: e.message })); |
| 311 | } |
| 312 | |
| 313 | private async send(msg: object): Promise<void> { |
| 314 | if (!this.transport) throw new Error(`MCP ${this.name} transport not initialized`); |