点击插件+号

点击创建插件

输入插件名称

然后添加工具,工具可以添加多个,名称必须是英文

在元数据中添加输入与输出,插件工具代码支持python与nodejs,我们以nodejs为例
然后在代码中修改,记得添加axios的依赖,使用axios请求自己的api服务器提供服务:
import { Args } from '@/runtime';
import { Input, Output } from "@/typings/find_codes/find_codes";
import axios from 'axios';
/**
* Each file needs to export a function named `handler`. This function is the entrance to the Tool.
* @param {Object} args.input - input parameters, you can get test input value by input.xxx.
* @param {Object} args.logger - logger instance used to print logs, injected by runtime
* @returns {*} The return data of the function, which should match the declared output parameters.
*
* Remember to fill in input/output in Metadata, it helps LLM to recognize and use tool.
*/
export async function handler({ input, logger }: Args<Input>): Promise<Output> {
// 发送一个GET请求
const response = await axios.post('https://www.bfw.wiki/', {
firstName: 'Fred',
lastName: 'Flintstone'
});
return {
codes: "您的代码链接:https://www.bfw.wiki/"+input.name,
};
};然后运行查看效果
最后点击发布,发布成功后
我们在插件中+号选择自己刚添加的插件局,然后问答中coze就会自动调用插件了。

网友回复
有没有免费让ai自动帮你接管操作电脑的mcp服务?
mcp为啥用Streamable HTTP 替代 HTTP + SSE?
scratchjr有没有开源的前端html网页版本源代码?
多模态大模型能否根据ui交互视频来来模仿写出前端交互动画效果ui代码?
如何用阿里云oss+函数计算fc+事件总线EventBridge+消息队列+数据库+redis缓存打造一个高并发弹性系统?
阿里云函数计算 FC如何在海外节点搭建一个代理网络?
ai studio中gemini build的代码如何发布到github pages等免费网页托管上 ?
如何在cursor、qoder、trae中使用Claude Skills功能?
有没有不用u盘就能重装系统的开源工具?
python如何固定摄像头实时计算停车场停车位剩余数量?


