(cause: unknown, toolName: string)
| 60 | }; |
| 61 | |
| 62 | const isUnknownToolCause = (cause: unknown, toolName: string): boolean => |
| 63 | // oxlint-disable-next-line executor/no-instanceof-tagged-error -- boundary: MCP SDK surfaces JSON-RPC protocol errors as this Error subclass |
| 64 | cause instanceof ProtocolError && |
| 65 | (cause.code === ProtocolErrorCode.InvalidParams || |
| 66 | cause.code === ProtocolErrorCode.MethodNotFound) && |
| 67 | // oxlint-disable-next-line executor/no-unknown-error-message -- boundary: instanceof narrows to the SDK's ProtocolError, whose message carries the only unknown-tool discriminator the protocol provides |
| 68 | isUnknownToolMessage(cause.message, toolName); |
| 69 | |
| 70 | // --------------------------------------------------------------------------- |
| 71 | // Elicitation bridge — decode incoming MCP ElicitRequest, route through |
no test coverage detected