工具发现:send_to_session 仍可用,但 helper 入口缺少提示导致模型误答不存在
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 401
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
## 问题
用户询问是否有 `send to session` 工具时,模型回答没有字面叫这个名字的工具,并列出了 `write_stdin`、子 agent 发消息和 Orca 消息工具,没有继续探索 `cindy_helper`。
实际 `send_to_session` 仍存在,问题表现为模型没有发现现有能力,而非工具实现被删除。
## 实际验证
2026-09-11 在当前 Cindy 任务中调用真实 MCP 发现入口:
1. `mcp__cindy_helper__list_tools({})` 返回 `cindy`、`control`、`history`、`feedback`、`handoff` 五个类目及工具数量;`handoff` 数量为 1,没有类目用途说明。
2. `mcp__cindy_helper__list_tools({category: "handoff"})` 成功返回 `send_to_session` 及完整说明。
3. 返回提示要求通过 `mcp__cindy_helper__call_tool({name: "send_to_session", args: {...}})` 执行。
本次仅验证发现流程,没有实际发送消息或新建任务。未取得原问题任务当时的完整工具清单,也没有验证其错误回答可以稳定复现。
## 相关变更
源码检查基于最新 main `48d3e9d16`。
PR #2829(提交 `f045326f1`,2026-09-06)修改了 `packages/lizi-mcps/src/lizi_xdtHelperMcpServer.ts`:
- `D_LIST_TOOLS` 原本明确说明 `handoff` 用于向已知 session 投递消息或新建专属 session,并包含 `send_to_session` 工具名;现在仅说明“探索当前任务获准使用的 Cindy 辅助能力”。
- `D_CALL_TOOL` 原本包含 `send_to_session` 等工具示例,现在删除了这些示例。
- 工具实现及 handoff 注册仍在。
上述提示删减是已确认的变更,会减少模型定位能力的线索;它是否是原问题任务误答的唯一原因,仍需进一步验证。
## 期望与建议
用户询问或需要跨任务发送消息时,模型应能找到 `send_to_session`,不应仅因顶层清单中没有这个名字就断言不存在。
建议为普通任务的发现入口补回简短的用途提示,明确跨任务消息投递与 `handoff` / `send_to_session` 的关系;类目概览也可提供简短用途说明。保留现有伙伴任务和受限任务的能力边界,避免给不可使用该能力的任务错误提示。
验证应覆盖工具发现说明及现有身份过滤,并在新任务中检查模型能否根据自然语言请求找到工具。
Contributor guide
Research direction
Start in packages/lizi-mcps/src/lizi_xdtHelperMcpServer.ts and inspect the D_LIST_TOOLS and D_CALL_TOOL descriptions alongside the handoff registration. Compare the current behavior with PR #2829 and verify that ordinary tasks receive enough guidance to find handoff/send_to_session without exposing restricted capabilities. Done means the discovery descriptions and identity-filtering checks cover the intended cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100