* Registers new capabilities. This can only be called before connecting to a transport. * * The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).
(capabilities: ServerCapabilities)
| 206 | * The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization). |
| 207 | */ |
| 208 | public registerCapabilities(capabilities: ServerCapabilities): void { |
| 209 | if (this.transport) { |
| 210 | throw new Error('Cannot register capabilities after connecting to transport'); |
| 211 | } |
| 212 | this._capabilities = mergeCapabilities(this._capabilities, capabilities); |
| 213 | } |
| 214 | |
| 215 | /** |
| 216 | * Override request handler registration to enforce server-side validation for tools/call. |
no test coverage detected