()
| 141 | } |
| 142 | |
| 143 | async stop(): Promise<void> { |
| 144 | this.failAllPending(new Error(`MCP server ${this.name} stopped`)); |
| 145 | if (this.transport) { |
| 146 | await this.transport.stop().catch(() => {}); |
| 147 | this.transport = null; |
| 148 | } |
| 149 | this.state = 'stopped'; |
| 150 | } |
| 151 | |
| 152 | async callTool(toolName: string, args: Record<string, unknown>, signal?: AbortSignal): Promise<MCPToolResult> { |
| 153 | if (this.state !== 'ready') { |
nothing calls this directly
no test coverage detected