























agent-tool-protocol 支持集成mcp 以及被mcp 集成,对于被mcp 的集成,实际上就是将agent-tool-protocol 的几个共同方法暴露给mcp
getATPTools(): Tool[] {
return [
createSearchApiTool(this), // 搜索api
createFetchAllApisTool(this), // 查看所有api
createExecuteCodeTool(this), // 通过代码模式执行工具
createExploreApiTool(this), // 类似文件系统模式的api查看
];
}
if (typeof mcpServer.registerTool === 'function') {
const inputSchema = tool.zodSchema?.shape ?? {};
mcpServer.registerTool(
tool.name,
{
description: tool.description || '',
inputSchema,
},
handler
);
} else if (typeof mcpServer.tool === 'function') {
const jsonSchema = {
type: tool.inputSchema.type,
properties: tool.inputSchema.properties || {},
required: tool.inputSchema.required || [],
};
mcpServer.tool(tool.name, tool.description || '', jsonSchema, handler);
}
agent-tool-protocol 内部的核心就是提供了几个通用的api 进行api 以及mcp服务包装,然后通过代码生成的模式进行工具调用执行
https://github.com/mondaycom/agent-tool-protocol
https://github.com/mondaycom/agent-tool-protocol/blob/master/packages/mcp-adapter/src/atp-to-mcp.ts
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。