openclaw - ✅(Solved) Fix [Bug]: /tools does not list mcp.servers tools even though the agent can see and call them [1 pull requests, 1 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#70874Fetched 2026-04-24 10:38:27
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×2cross-referenced ×1

In a normal OpenClaw session, tools from mcp.servers are usable by the agent, but /tools and /tools verbose do not list them.

This makes it look like MCP tools are not injected, even though they actually are available at runtime.

Root Cause

Earlier I had a bad config shape (`baseUrl` instead of `url`), which produced:
text
bundle-mcp: skipped server "mymcp" because its command is missing and its url is missing
After fixing config to use `url` and `transport: "streamable-http"`, the agent can call the MCP tools successfully, but `/tools` still does not show them.

Fix Action

Fixed

PR fix notes

PR #70876: fix: include MCP server tools in /tools inventory

Description (problem / solution / changelog)

Summary

/tools and /tools verbose now list tools from configured MCP servers (mcp.servers) in addition to built-in, plugin, and channel tools.

Problem

Previously, /tools only showed tools from createOpenClawCodingTools(), but MCP tools are materialized separately via materializeBundleMcpToolsForRun() in the session run pipeline (attempt.ts). This caused /tools to omit MCP tools even though they were available to the agent at runtime.

The session run correctly merges both:

// attempt.ts
const effectiveTools = [...tools, ...filteredBundledTools]; // core + MCP

But /tools only called the first half.

Fix

In handleToolsCommand, after resolving the core tool inventory, also fetch the session MCP runtime via getOrCreateSessionMcpRuntime() and materialize its tools. MCP tools are appended as a new "MCP servers" group in the inventory output.

If the MCP runtime is unavailable (no mcp.servers configured, or connection fails), the command gracefully falls back to showing only the core tools — matching current behavior.

Changes

  • tools-effective-inventory.types.ts: Add "mcp" to EffectiveToolSource union
  • tools-effective-inventory.ts: Add "mcp" case to groupLabel()
  • commands-info.ts: Import MCP runtime functions; after resolving core inventory, fetch and append MCP tools as a new group

Testing

All 24 existing tests pass:

  • tools-effective-inventory.test.ts (6 tests)
  • commands-info.tools.test.ts (11 tests)
  • commands-info.test.ts (7 tests)

Closes #70874

Changed files

  • src/agents/tools-effective-inventory.ts (modified, +2/-0)
  • src/agents/tools-effective-inventory.types.ts (modified, +1/-1)
  • src/auto-reply/reply/commands-info.ts (modified, +78/-1)
  • src/infra/install-package-dir.test.ts (modified, +1/-1)
  • src/infra/install-package-dir.ts (modified, +23/-2)

Code Example

Earlier I had a bad config shape (`baseUrl` instead of `url`), which produced:
text
bundle-mcp: skipped server "mymcp" because its command is missing and its url is missing
After fixing config to use `url` and `transport: "streamable-http"`, the agent can call the MCP tools successfully, but `/tools` still does not show them.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

In a normal OpenClaw session, tools from mcp.servers are usable by the agent, but /tools and /tools verbose do not list them.

This makes it look like MCP tools are not injected, even though they actually are available at runtime.

Steps to reproduce

  1. Configure mcp.servers with a working remote MCP server
  2. Restart gateway
  3. Start a new session
  4. Run /tools verbose
  5. Observe MCP tools are missing from /tools
  6. Ask the agent to use/check MCP tools
  7. Observe the agent can see and call them successfully

Expected behavior

  • /tools and /tools verbose should list the MCP tools exposed by mcp.servers

Actual behavior

  • /tools does not list the MCP tools
  • but if I ask the agent about MCP tools, it can see them
  • and the agent is able to successfully call those MCP tools

So runtime tool access works, but the /tools inventory appears incomplete/inaccurate.

OpenClaw version

2026.4.22

Operating system

macOS

Install method

No response

Model

sonnet 4.6

Provider / routing chain

bedrock

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Earlier I had a bad config shape (`baseUrl` instead of `url`), which produced:
text
bundle-mcp: skipped server "mymcp" because its command is missing and its url is missing
After fixing config to use `url` and `transport: "streamable-http"`, the agent can call the MCP tools successfully, but `/tools` still does not show them.

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue might be resolved by verifying the configuration of mcp.servers and ensuring that the tools are properly exposed.

Guidance

  • Review the mcp.servers configuration to ensure that the url and transport settings are correct, as indicated by the fix for the baseUrl issue.
  • Check the logs for any errors or warnings related to the MCP tools or the /tools command.
  • Verify that the agent can access the MCP tools using a different method, such as by asking the agent to use a specific tool.
  • Investigate the difference between the /tools command and the agent's ability to access MCP tools at runtime.

Example

No code snippet is provided as the issue does not contain sufficient information to create a relevant example.

Notes

The issue seems to be related to the configuration of mcp.servers and the exposure of MCP tools. However, without more information about the configuration and the logs, it is difficult to provide a more specific solution.

Recommendation

Apply workaround: Verify the mcp.servers configuration and ensure that the tools are properly exposed, as this has resolved similar issues in the past.

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…

FAQ

Expected behavior

  • /tools and /tools verbose should list the MCP tools exposed by mcp.servers

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 - ✅(Solved) Fix [Bug]: /tools does not list mcp.servers tools even though the agent can see and call them [1 pull requests, 1 participants]