麦克读器用量

createMcpTools()

createMcpTools(servers, { clients? }) → object

将连接的服务器变成引擎形状的工具—— 与自定义工具一样的形状, 所以它们被允许和计算 和其他所有工具一样。

engine shapecategory from the serverclients are reused
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

import { createMcpTools } from "iagenify";

const servers = await api.mcp.forAgent(["example"]);
const tools = createMcpTools(servers);
// { example_search_docs: { description, parameters, category, run } }
from iagenify import create_mcp_tools

servers = api.mcp.for_agent(["example"])
tools = create_mcp_tools(servers)
# {"example_search_docs": {"description", "parameters", "category", "run"}}

形状

字段调自
description服务器的工具描述 。
parameters血型 消毒
category服务器服务器不是工具的
run调用服务器,携带任何标题说明。

此类别是服务器的分类

未使用协议只读的提示

服务器对它本身进行申报,这不是证据。 未经允许在自动模式下运行的第三方工具是这里最糟糕的回归,因此该类别来自连接——默认执行。

客户再利用连接

传递地图, 每个服务器的客户端都保存在里面, 所以运行时呼叫多个服务器工具, 一次一个服务器握手 。

引擎自己做这个

agents.create({ mcp }) 调 调 电话 forAgent() 然后,每个运行。只有当您正在组装自己的工具目录时,才直接使用它。