openclaw - 💡(How to fix) Fix message tool: react action incorrectly requires 'buttons' field [1 comments, 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#53766Fetched 2026-04-08 01:23:38
View on GitHub
Comments
1
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
closed ×1commented ×1locked ×1

Code Example

Validation failed for tool "message":
  - buttons: must have required property 'buttons'

Received arguments:
{
  "action": "react",
  "emoji": "👍"
}
RAW_BUFFERClick to expand / collapse

Problem

When using the message tool with action: react, validation fails with:

Validation failed for tool "message":
  - buttons: must have required property 'buttons'

Received arguments:
{
  "action": "react",
  "emoji": "👍"
}

Expected Behavior

action: react should only require emoji (and optionally messageId), not buttons.

Environment

  • OpenClaw: 2026.3.23-1
  • OS: macOS 26.4 (arm64)
  • Channel: Telegram

Suggested Fix

The JSON schema for message tool appears to have buttons in the global required array. It should be conditionally required only when action: send with button content.

extent analysis

Fix Plan

To resolve the validation issue, we need to update the JSON schema for the message tool to conditionally require the buttons property only when action is send.

Here are the steps:

  • Update the JSON schema to include a conditional requirement for buttons based on the action type.
  • Ensure the schema validation logic is updated to handle this conditional requirement.

Example JSON schema update:

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

Verification

To verify the fix, test the message tool with both action: react and action: send, ensuring that:

  • action: react only requires emoji (and optionally messageId).
  • action: send requires both buttons and any other necessary properties.

Extra Tips

  • Ensure that the updated schema is properly validated and tested before deployment to prevent regressions.
  • Consider adding additional tests to cover different scenarios and edge cases for the message tool.

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 message tool: react action incorrectly requires 'buttons' field [1 comments, 1 participants]