UNPKG

ant-design-x-vue-next

Version:

Ant Design X for Vue — community continuation aligned with @ant-design/x

37 lines (36 loc) 1.19 kB
import type { AnyObject } from '../_util/type'; import { type XRequestOptions } from '../x-request'; export interface XMCPTool { name: string; description?: string; inputSchema: { type: 'object'; properties: AnyObject; }; annotations?: { title?: string; readOnlyHint?: boolean; destructiveHint?: boolean; idempotentHint?: boolean; openWorldHint?: boolean; }; } export type XMCPClientOptions = Pick<XRequestOptions, 'timeout' | 'fetch' | 'middlewares' | 'dangerouslyApiKey' | 'model'> & { /** Extra request headers */ headers?: Record<string, string>; /** Body params merged into XRequest.create */ params?: AnyObject; }; declare class XMCPClientClass { readonly baseURL: string; private options; constructor(baseURL: string, options?: XMCPClientOptions); /** * Fetch MCP tool list from the given endpoint (POST JSON via XRequest). * Aligned with `@ant-design/x-sdk` XMCPClient.tools(). */ tools(): Promise<XMCPTool[]>; } declare function XMCPClient(baseURL: string, options?: XMCPClientOptions): XMCPClientClass; export { XMCPClient }; export default XMCPClient;