mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
@@ -82,6 +82,44 @@ Enabling the **Memory** toggle empowers the Agent to retain and recall conversat
|
||||
|
||||
For example, when users employ pronouns (such as “it”, “this”, or “they”) in subsequent messages, an Agent with Memory enabled can understand what these pronouns refer to from previous context without requiring users to restate complete information.
|
||||
|
||||
|
||||
## Customizing MCP Tools for Your Use Case
|
||||
|
||||
When you add an MCP tool to an agent node or agent, you can customize how it behaves:
|
||||
|
||||
<img
|
||||
src="/images/CleanShot2025-07-07at07.41.33@2x.png"
|
||||
alt="CleanShot 2025-07-07 at 07.41.33@2x.png"
|
||||
title="CleanShot 2025-07-07 at 07.41.33@2x.png"
|
||||
className="mx-auto"
|
||||
style={{ width:"57%" }}
|
||||
/>
|
||||
|
||||
### Tool Description
|
||||
|
||||
You can override the default description that comes from the MCP server. This is useful for making the description more specific to your use case.
|
||||
|
||||
### Parameter Configuration (Reasoning Config)
|
||||
|
||||
For each tool parameter, you can choose between:
|
||||
|
||||
**Auto**: Let the AI model determine the parameter value based on context (default behavior)
|
||||
|
||||
**Fixed Value**: Set a specific value (can be a static value or a variable) that will always be used, removing the parameter from AI inference
|
||||
|
||||
This is powerful for:
|
||||
|
||||
- Setting consistent configuration values (like `numResults: 10` for search tools)
|
||||
- Pre-filling parameters that shouldn't change (like specific API endpoints or format preferences)
|
||||
- Simplifying tool usage by reducing the number of parameters the AI needs to handle
|
||||
|
||||
For example, with a web search tool, you might:
|
||||
|
||||
- Keep `query` on "Auto" so the AI determines what to search for
|
||||
- Set `numResults` to a fixed value like "5" to limit response size
|
||||
- Set other parameters like search filters to fixed values for consistent behavior
|
||||
|
||||
|
||||
<video controls src="https://assets-docs.dify.ai/2025/04/1801b96763eb8f22f1e2158645897885.mp4" width="100%"></video>
|
||||
|
||||
{/*
|
||||
|
||||
@@ -98,6 +98,42 @@ title: エージェント
|
||||
|
||||
例えば、ユーザーが後続のメッセージで代名詞(「それ」、「これ」、「彼ら」など)を使用する場合、メモリ機能が有効になっているエージェントは、ユーザーが完全な情報を繰り返し述べなくても、これらの代名詞が前のコンテキストから何を指しているかを理解できます。
|
||||
|
||||
### MCP ツールをユースケースにカスタマイズする
|
||||
|
||||
Agent ノードや Agent に MCP ツールを追加すると、カスタマイズ方法はこちらです:
|
||||
|
||||
<img
|
||||
src="/images/CleanShot2025-07-07at07.41.33@2x.png"
|
||||
alt="CleanShot 2025-07-07 at 07.41.33@2x.png"
|
||||
title="CleanShot 2025-07-07 at 07.41.33@2x.png"
|
||||
className="mx-auto"
|
||||
style={{ width:"57%" }}
|
||||
/>
|
||||
|
||||
### ツールの説明
|
||||
|
||||
MCPサーバーからのデフォルトの説明をオーバーライドできます。これにより、ユースケースに特化した説明が可能です。
|
||||
|
||||
### パラメーター設定(推論設定)
|
||||
|
||||
各ツールパラメーターについて、次の選択ができます:
|
||||
|
||||
**自動**: コンテキストに基づいてAIモデルがパラメーター値を決定します(デフォルトの動作)。
|
||||
|
||||
**固定値**: 常に使用される特定の値(静的な値または変数)を設定し、AIの推論からパラメーターを取り除きます。
|
||||
|
||||
これは次のような状況で便利です:
|
||||
|
||||
- 一貫した設定値を設定するため(検索ツールに対して `numResults: 10` のように)。
|
||||
- 変更すべきでないパラメーターを事前に設定するため(特定のAPIエンドポイントやフォーマット設定)。
|
||||
- AIが処理する必要のあるパラメーターを減らしてツールの使用を簡素化します。
|
||||
|
||||
例えば、Web 検索ツールを使う場合、以下のように設定できます:
|
||||
|
||||
* `query`を「自動」に保ち、AIが何を検索するかを決定します。
|
||||
* `numResults`を「5」として固定値に設定し、応答サイズを制限します。
|
||||
* 検索フィルターなど他のパラメーターを固定値として設定し、一貫した動作を実現します。
|
||||
|
||||
<video controls src="https://assets-docs.dify.ai/2025/04/1801b96763eb8f22f1e2158645897885.mp4" width="100%"></video>
|
||||
|
||||
{/*
|
||||
|
||||
@@ -78,6 +78,42 @@ Agent 节点执行过程中将生成详细日志。显示节点执行的总体
|
||||
|
||||
例如,当用户在后续消息中使用代词(如“它”、“这个”或“他们”)时,启用了记忆功能的 Agent 能够理解这些代词所指代的前文实体,无需用户重复提及完整信息。
|
||||
|
||||
## 按需定制 MCP 工具
|
||||
|
||||
将 MCP 工具添加到Agent节点或 Agent 应用中后,你可以根据实际需求灵活定制:
|
||||
|
||||
<img
|
||||
src="/images/CleanShot2025-07-07at07.41.33@2x.png"
|
||||
alt="CleanShot 2025-07-07 at 07.41.33@2x.png"
|
||||
title="CleanShot 2025-07-07 at 07.41.33@2x.png"
|
||||
className="mx-auto"
|
||||
style={{ width:"57%" }}
|
||||
/>
|
||||
|
||||
### 工具说明
|
||||
|
||||
可自定义工具的显示描述,调整为更贴合业务场景的说明信息,替换原 MCP 服务器自带描述。
|
||||
|
||||
### 参数配置(Reasoning Config)
|
||||
|
||||
每个工具参数可灵活选择两种模式:
|
||||
|
||||
* **自动(Auto)**:让 AI 根据上下文智能决定该参数值(默认)。
|
||||
|
||||
* **固定值(Fixed Value)**:设定为某个确定的值(支持静态文本或变量表达式),AI 不再推理此参数。
|
||||
|
||||
使用示例:
|
||||
|
||||
* 统一配置项,例如将搜索工具的 `numResults` 固定为 10。
|
||||
* 预填写不应更改的参数,如特定的 API 地址、返回格式等。
|
||||
* 通过减少 AI 需要处理的参数数量,简化工具调用逻辑。
|
||||
|
||||
例如,配置 Web 搜索工具时:
|
||||
|
||||
* 将 `query` 设置为"自动",由 AI 动态生成搜索内容。
|
||||
* 将 `numResults` 固定为 5,控制每次返回结果数量。
|
||||
* 其他如过滤条件参数也可固定,以保证结果一致性。
|
||||
|
||||
<video controls src="https://assets-docs.dify.ai/2025/04/1801b96763eb8f22f1e2158645897885.mp4" width="100%"></video>
|
||||
|
||||
{/*
|
||||
|
||||
Reference in New Issue
Block a user