1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import request from "@/utils/request";
 
export const previewMcpTools = async (mountId) => {
    const res = await request.get(`aiMcpMount/${mountId}/tools`);
    const { code, msg, data } = res.data;
    if (code === 200) {
        return data || [];
    }
    throw new Error(msg || "获取工具列表失败");
};
 
export const testMcpTool = async (mountId, payload) => {
    const res = await request.post(`aiMcpMount/${mountId}/tool/test`, payload);
    const { code, msg, data } = res.data;
    if (code === 200) {
        return data;
    }
    throw new Error(msg || "工具测试失败");
};