openclaw - 💡(How to fix) Fix Mail MCP tools declare output schemas but return unstructured content, breaking list/read/move/mark [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#63283Fetched 2026-04-09 07:55:54
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
closed ×1

OpenClaw's Mail MCP integration is currently failing at the tool boundary because Mail tools declare output schemas but return unstructured content.

Representative gateway errors:

[tools] mail__list failed: MCP error -32600: Tool list has an output schema but did not return structured content
[tools] mail__get_message_json failed: MCP error -32600: Tool get_message_json has an output schema but did not return structured content
[tools] mail__read_message_contents failed: MCP error -32600: Tool read_message_contents has an output schema but did not return structured content
[tools] mail__mark failed: MCP error -32600: Tool mark has an output schema but did not return structured content
[tools] mail__move failed: MCP error -32600: Tool move has an output schema but did not return structured content

Error Message

[tools] mail__list failed: MCP error -32600: Tool list has an output schema but did not return structured content [tools] mail__get_message_json failed: MCP error -32600: Tool get_message_json has an output schema but did not return structured content [tools] mail__read_message_contents failed: MCP error -32600: Tool read_message_contents has an output schema but did not return structured content [tools] mail__mark failed: MCP error -32600: Tool mark has an output schema but did not return structured content [tools] mail__move failed: MCP error -32600: Tool move has an output schema but did not return structured content

  • mark/move operations fail with the same schema error
  • scheduled mailbox-cleanup jobs are left in partial/error state [tools] mail__list failed: MCP error -32600: Tool list has an output schema but did not return structured content raw_params={"scope":"mailbox://inbox","limit":50,"presentation":"structured"} [tools] mail__list failed: MCP error -32600: Tool list has an output schema but did not return structured content raw_params={"scope":"mailbox://sent","presentation":"compact","limit":30} [tools] mail__get_message_json failed: MCP error -32600: Tool get_message_json has an output schema but did not return structured content raw_params={"identifier":"message://..."} [tools] mail__read_message_contents failed: MCP error -32600: Tool read_message_contents has an output schema but did not return structured content raw_params={"identifier":"message://...","maxChars":4000} [tools] mail__mark failed: MCP error -32600: Tool mark has an output schema but did not return structured content raw_params={"identifier":"message://...","status":"read"} [tools] mail__move failed: MCP error -32600: Tool move has an output schema but did not return structured content raw_params={"identifier":"message://...","toMailbox":"mailbox://Exchange/Archive"}

Root Cause

This currently blocks any automation depending on Mail tools, including periodic inbox triage and downstream task creation workflows.

Code Example

[tools] mail__list failed: MCP error -32600: Tool list has an output schema but did not return structured content
[tools] mail__get_message_json failed: MCP error -32600: Tool get_message_json has an output schema but did not return structured content
[tools] mail__read_message_contents failed: MCP error -32600: Tool read_message_contents has an output schema but did not return structured content
[tools] mail__mark failed: MCP error -32600: Tool mark has an output schema but did not return structured content
[tools] mail__move failed: MCP error -32600: Tool move has an output schema but did not return structured content

---

[tools] mail__list failed: MCP error -32600: Tool list has an output schema but did not return structured content raw_params={"scope":"mailbox://inbox","limit":50,"presentation":"structured"}
[tools] mail__list failed: MCP error -32600: Tool list has an output schema but did not return structured content raw_params={"scope":"mailbox://sent","presentation":"compact","limit":30}
[tools] mail__get_message_json failed: MCP error -32600: Tool get_message_json has an output schema but did not return structured content raw_params={"identifier":"message://..."}
[tools] mail__read_message_contents failed: MCP error -32600: Tool read_message_contents has an output schema but did not return structured content raw_params={"identifier":"message://...","maxChars":4000}
[tools] mail__mark failed: MCP error -32600: Tool mark has an output schema but did not return structured content raw_params={"identifier":"message://...","status":"read"}
[tools] mail__move failed: MCP error -32600: Tool move has an output schema but did not return structured content raw_params={"identifier":"message://...","toMailbox":"mailbox://Exchange/Archive"}
RAW_BUFFERClick to expand / collapse

Summary

OpenClaw's Mail MCP integration is currently failing at the tool boundary because Mail tools declare output schemas but return unstructured content.

Representative gateway errors:

[tools] mail__list failed: MCP error -32600: Tool list has an output schema but did not return structured content
[tools] mail__get_message_json failed: MCP error -32600: Tool get_message_json has an output schema but did not return structured content
[tools] mail__read_message_contents failed: MCP error -32600: Tool read_message_contents has an output schema but did not return structured content
[tools] mail__mark failed: MCP error -32600: Tool mark has an output schema but did not return structured content
[tools] mail__move failed: MCP error -32600: Tool move has an output schema but did not return structured content

Impact

This breaks inbox triage and sent-mail reconciliation workflows, because the tools fail even when the underlying Mail action may have run.

Observed fallout in my setup:

  • inbox list fails for both presentation: structured and presentation: compact
  • message metadata/body reads fail
  • mark/move operations fail with the same schema error
  • scheduled mailbox-cleanup jobs are left in partial/error state

Environment

  • OpenClaw: 2026.4.8
  • Gateway config points Mail MCP at http://localhost:8106/mcp using streamable-http
  • Platform: macOS arm64

Evidence

From ~/.openclaw/logs/gateway.err.log on 2026-04-08:

[tools] mail__list failed: MCP error -32600: Tool list has an output schema but did not return structured content raw_params={"scope":"mailbox://inbox","limit":50,"presentation":"structured"}
[tools] mail__list failed: MCP error -32600: Tool list has an output schema but did not return structured content raw_params={"scope":"mailbox://sent","presentation":"compact","limit":30}
[tools] mail__get_message_json failed: MCP error -32600: Tool get_message_json has an output schema but did not return structured content raw_params={"identifier":"message://..."}
[tools] mail__read_message_contents failed: MCP error -32600: Tool read_message_contents has an output schema but did not return structured content raw_params={"identifier":"message://...","maxChars":4000}
[tools] mail__mark failed: MCP error -32600: Tool mark has an output schema but did not return structured content raw_params={"identifier":"message://...","status":"read"}
[tools] mail__move failed: MCP error -32600: Tool move has an output schema but did not return structured content raw_params={"identifier":"message://...","toMailbox":"mailbox://Exchange/Archive"}

The MCP endpoint itself is reachable and responds with SSE headers on GET /mcp, so this does not look like a simple connectivity failure.

Expected behavior

If the tools declare output schemas, they should always return structured content matching those schemas, or the bridge should adapt plain/text responses into structured output before exposing them to OpenClaw.

Suspected root cause

Likely one of:

  • the Mail MCP server returns plain text / legacy output while advertising structured outputs
  • the OpenClaw MCP bridge is not wrapping/adapting the Mail server's responses correctly
  • a server/tool descriptor mismatch exists between declared output schemas and actual result payloads

Why this matters

This currently blocks any automation depending on Mail tools, including periodic inbox triage and downstream task creation workflows.

extent analysis

TL;DR

The most likely fix involves ensuring the Mail MCP server returns structured content matching its declared output schemas or modifying the OpenClaw MCP bridge to adapt plain/text responses into structured output.

Guidance

  • Verify the Mail MCP server's response format to confirm whether it matches the declared output schemas.
  • Check the OpenClaw MCP bridge configuration to ensure it is correctly set up to handle the Mail server's responses, potentially adapting plain/text to structured content.
  • Review the tool descriptors for any mismatches between declared output schemas and actual result payloads.
  • Consider temporarily modifying the Mail tools to not declare output schemas if the bridge cannot adapt the responses, as a workaround to restore basic functionality.

Example

No specific code snippet can be provided without more details on the bridge or server implementation, but ensuring the response from the Mail MCP server is JSON-formatted and matches the expected schema could resolve the issue.

Notes

The exact solution depends on the specifics of the Mail MCP server's implementation and the OpenClaw MCP bridge's capabilities, which are not fully detailed in the provided information.

Recommendation

Apply a workaround by either ensuring the Mail MCP server returns structured content or modifying the OpenClaw MCP bridge to correctly adapt responses, as upgrading to a fixed version is not mentioned as an option in the provided context. This approach is chosen because it directly addresses the suspected root causes of 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…

FAQ

Expected behavior

If the tools declare output schemas, they should always return structured content matching those schemas, or the bridge should adapt plain/text responses into structured output before exposing them to OpenClaw.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING