openclaw - 💡(How to fix) Fix Bug: message tool schema incorrectly marks 'buttons' as required for all actions [1 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#53749Fetched 2026-04-08 01:23:58
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Timeline (top)
commented ×1

The message tool schema has buttons marked as a required parameter, but this breaks non-button actions like action=react.

Root Cause

Tool validation rejects the call because buttons is missing.

Code Example

{
  "action": "react",
  "emoji": "👋"
}

---

Validation failed for tool "message":
  - buttons: must have required property 'buttons'
RAW_BUFFERClick to expand / collapse

Summary

The message tool schema has buttons marked as a required parameter, but this breaks non-button actions like action=react.

Steps to Reproduce

  1. Try to use the message tool to add a reaction:
{
  "action": "react",
  "emoji": "👋"
}
  1. Validation fails with:
Validation failed for tool "message":
  - buttons: must have required property 'buttons'

Expected Behavior

action=react should work without requiring buttons parameter.

Actual Behavior

Tool validation rejects the call because buttons is missing.

Environment

  • OpenClaw version: 2026.3.23-1
  • Channel: Telegram
  • reactionLevel: extensive

Suggested Fix

In the message tool schema, buttons should only be required when action=send with button content, not as a global required parameter.

extent analysis

Fix Plan

To resolve the issue, we need to modify the message tool schema to make buttons a conditional required parameter.

  • Update the schema to include a conditional requirement for buttons based on the action type.
  • Use a JSON schema extension like if-then-else to achieve this.

Example Code

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "action": {"type": "string"},
    "buttons": {"type": "array", "items": {"type": "object"}}
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "action": {"const": "send"}
        },
        "required": ["action"]
      },
      "then": {
        "required": ["buttons"]
      }
    }
  ]
}

In this example, buttons is only required when action is send.

Verification

To verify the fix, try sending a reaction action without buttons:

{
  "action": "react",
  "emoji": "👋"
}

The validation should pass, and the reaction should be added successfully.

Extra Tips

  • Make sure to update the schema documentation to reflect the changed requirements.
  • Test the updated schema with different action types to ensure the conditional requirement works as expected.

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: message tool schema incorrectly marks 'buttons' as required for all actions [1 comments, 2 participants]