openclaw - 💡(How to fix) Fix [Bug] MCP server tools missing from LLM request body on v2026.4.26 [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#74884Fetched 2026-05-01 05:40:21
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
2
Author
Timeline (top)
commented ×2closed ×1cross-referenced ×1mentioned ×1

Code Example

"tools": [
  {"type": "function", "function": {"name": "edit"}},
  {"type": "function", "function": {"name": "exec"}},
  ... 13 more bundled tools ...
]
// no outlook__*, no gmail__*, no server__* of any kind
RAW_BUFFERClick to expand / collapse

问题摘要

MCP server tools 在正常 main-agent turns 中完全丢失,静态代码审查未发现此问题。

影响版本: v2026.4.26 复现: openclaw mcp list 显示正常,直接 stdio probe 正常,但 LLM request body 无 MCP tools


症状

  • openclaw mcp list 正常显示两个 stdio server
  • 直接 stdio probe tools/list 返回正常
  • LLM request body 的 tools[] 只有 15 个内置工具,零个 server__* 条目
  • 影响所有 normal main-agent turns(BlueBubbles/Slack/飞书等)

Wire Capture

"tools": [
  {"type": "function", "function": {"name": "edit"}},
  {"type": "function", "function": {"name": "exec"}},
  ... 13 more bundled tools ...
]
// no outlook__*, no gmail__*, no server__* of any kind

完整 capture 见 #74844 Diagnostic data section。


代码审查盲区

静态 review 引用 loadMergedBundleMcpConfigrunEmbeddedPiAgentbundle-mcp-config.ts:49,但代码存在不等于运行:

  1. materialization 路径可能没有在正常 main-agent turns 下执行,或
  2. 执行了但在序列化前被过滤

相关 Issue

  • #74844 — 本次,含 wire capture
  • #74726 — luuq2026 之前报告相同根因,被关闭
  • #74387 — 静态 review,因缺少 falsifying evidence 未复现

复现

  1. 配置两个 stdio MCP server(health check 通过)
  2. openclaw mcp list 确认显示
  3. 用 debug proxy 拦截 request body
  4. 检查 tools[] — 预期有 server__*,实际只有 15 个内置工具

报告人: qi liu / luuq2026

extent analysis

TL;DR

Review the loadMergedBundleMcpConfig and runEmbeddedPiAgent functions to ensure they are correctly loading and serializing the MCP server tools during normal main-agent turns.

Guidance

  • Investigate the materialization path in bundle-mcp-config.ts:49 to determine if it is being executed during normal main-agent turns.
  • Verify that the server__* tools are being correctly added to the tools[] array before serialization.
  • Check for any filtering or modification of the tools[] array that may be removing the server__* tools before they are sent in the LLM request body.
  • Compare the wire capture from #74844 with the expected output to identify any discrepancies.

Example

No code snippet is provided as the issue lacks specific implementation details.

Notes

The issue may be related to the dynamic nature of the code, which can make it difficult to identify the root cause through static review alone. The fact that the issue only occurs during normal main-agent turns suggests that there may be a timing or sequencing issue at play.

Recommendation

Apply workaround: Review and modify the loadMergedBundleMcpConfig and runEmbeddedPiAgent functions to ensure correct loading and serialization of MCP server tools. This is recommended as the issue appears to be related to the dynamic loading and serialization of the tools, and modifying these functions may help to resolve the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug] MCP server tools missing from LLM request body on v2026.4.26 [2 comments, 2 participants]