Enable non-existent tool fallback with MCP server

未关闭
#400 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@chethanuk 已经在做这个了。

开始于 2026年10月6日。

  • #984 来自 @chethanuk —— 已关闭,未合并

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
ai, data

调研方向

首先跟踪 MCP 服务器的工具调用处理流程,以及请求的工具不可用时 execution.log 中报告的失败。定义可选的回退行为,包括默认错误消息以及用户覆盖该消息的方式。完成标准是:出现幻觉的工具调用能够提醒模型并进行恢复,而不是自动丢弃记录。

由索引模型根据 Issue 内容生成。

描述

enhancement
Priority Level

Medium (Nice to have)

Is your feature request related to a problem? Please describe.

Right now, when using an MCP server, Data Designer immediately errors out and drops the row if a model attempts to call a non-existent tool. E.g.:

[03/12/26 02:43:16] INFO     Processing request of type            server.py:720
                             CallToolRequest                                    
[02:43:17] [WARNING] ⚠️ Generation for record at index 197 failed. Will omit this record from the dataset.
Tool 'CalcNumSaturatedHeterocycles' not found on any configured provider.

I've found that all tested models hallucinate tools sometimes, resulting in many failed records. For SDG, there are many cases where this is sub-optimal because it doesn't show the model the consequences of hallucinated tool calls.

Describe the solution you'd like

I would like to have an optional catch and fallback to alert the model that the tool doesn't exist. Ideally, we would provide a default error message which could be overridden by the user.

Describe alternatives you've considered

Right now, I inspect execution.log directly to identify when the model called hallucinated tools, since there is no statistics reporting on it and the row is dropped.

I don't have a workaround for recovering from hallucinated tool calls.

Additional context

No response

主要语言
Python
星标
2.4k
派生
243
平均合并
1 天 3 小时
30 天内合并 PR
88

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA-NeMo/DataDesigner 的其他 Issue

查看 NVIDIA-NeMo/DataDesigner 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。