zhou zhou
1 天以前 eb49fb9a98d6dd4e4361daf4eac4f9313236b8e8
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 || "工具测试失败");
};