MCPServer
이 콘텐츠는 아직 번역되지 않았습니다.
Interface for MCP server implementations. Provides methods for connecting, listing tools, calling tools, and cleanup.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”cacheToolsList
Section titled “cacheToolsList”cacheToolsList: boolean;errorFunction?
Section titled “errorFunction?”optional errorFunction: MCPToolErrorFunction | null;Optional function to convert MCP tool failures into model-visible messages. Set to null to rethrow errors instead of converting them.
readonly name: string;toolFilter?
Section titled “toolFilter?”optional toolFilter: | MCPToolFilterCallable | MCPToolFilterStatic;toolMetaResolver?
Section titled “toolMetaResolver?”optional toolMetaResolver: MCPToolMetaResolver;Methods
Section titled “Methods”callTool()
Section titled “callTool()”callTool( toolName, args,meta?): Promise<object[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<object[]>
close()
Section titled “close()”close(): Promise<void>;Returns
Section titled “Returns”Promise<void>
connect()
Section titled “connect()”connect(): Promise<void>;Returns
Section titled “Returns”Promise<void>
invalidateToolsCache()
Section titled “invalidateToolsCache()”invalidateToolsCache(): Promise<void>;Returns
Section titled “Returns”Promise<void>
listTools()
Section titled “listTools()”listTools(): Promise<object[]>;Returns
Section titled “Returns”Promise<object[]>