UNPKG

bc_resource_mcp

Version:

MCP server for Baichuan resource

20 lines (19 loc) 628 B
// 创建自定义错误类 export class ToolNotFoundError extends Error { constructor(toolName) { super(`Tool ${toolName} not found`); this.name = "ToolNotFoundError"; } } export class UnexpectedResultTypeError extends Error { constructor(toolName, resultType) { super(`Unexpected result type from tool ${toolName}: ${resultType}`); this.name = "UnexpectedResultTypeError"; } } export class MissingRequiredArgumentError extends Error { constructor(argName) { super(`Missing required argument: ${argName}`); this.name = "MissingRequiredArgumentError"; } }