# tools()

Canonical URL: https://developers.iagenify.com/zh/sdk/ref/mcp/tools/
Language: zh

`api.mcp.tools(names?) → Promise<Declaration[]>`

这些服务器的允许工具,作为随时可以使用的申报单 models.turn({ tools })任何人在写自己的回环 MCP 并不取决于我们的引擎。

Status: ready for turn() · sanitised · names are prefixed

```javascript
const tools = await api.mcp.tools(["example"]);
// [{ name: "example_search_docs", description: "…", parameters: { … } }]

const turn = await api.models.turn({
  model: "gemini-3.5-flash",
  messages: [{ role: "user", content: "Find the retry policy." }],
  tools,
});
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `names` | string[]|null | all connected | 哪个服务器? `[]` 返回无。 |

## 名称随有服务器 {#prefixed}

`example_search_docs` - 两个服务器都能够提供 `search`,第三方工具绝不能使用我们中的一个人的名字。这个名字被缩写为64个字符。

## 血清已经净化 {#sanitised}

> **这不是一种预防措施,这是必要的**
>
> 供应商拒绝原 MCP 系统模型 — — 一种参考、一种不寻常的构造 — — 并且整个转折都失败了,而不仅仅是工具。 第三方服务器可以打破所有答案。 将每个服务器都降为供应商所理解的, 将一个没有可用类型的系统模型变成字符串参数, 而不是一个根本无法申报的工具。

## 里面没有牌子 {#no-token}

仅声明声明。 [api.mcp.call()](/zh/sdk/ref/mcp/call),它读取连接本身。

## 违反向代理人提供 {#versus}

|  | () 工具+您的循环 | agents.create({ mcp }) |
| --- | --- | --- |
| 负责往返旅行的 | 您 您 的 您 | 引擎 |
| 每个呼叫权限 | 用于构建 | 类别中,通过 `onPermission` |
| 预算 | 您的 | 计算并强制执行 |
| 工作 工作 | 任何提供者 | 任何提供者 |

- [models.turn()](/zh/sdk/ref/models/turn): 这些东西放哪了
- [forAgent()](/zh/sdk/ref/mcp/for-agent): 引擎的版本
- [api.mcp](/zh/sdk/ref/mcp): 连接、列出和使用服务器。

```python
tools = api.mcp.tools(["example"])
# [{"name": "example_search_docs", "description": "…", "parameters": {…}}]

turn = api.models.turn(
    model="gemini-3.5-flash",
    messages=[{"role": "user", "content": "Find the retry policy."}],
    tools=tools,
)
```
