openclaw - ✅(Solved) Fix [Bug]: Regression: openai/gpt-5.4 rejects parameter-free MCP tool schemas again in v2026.4.27 [2 pull requests, 2 comments, 3 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#75362Fetched 2026-05-02 05:35:37
View on GitHub
Comments
2
Participants
3
Timeline
12
Reactions
2
Timeline (top)
referenced ×5commented ×2cross-referenced ×2labeled ×2

After upgrading to OpenClaw v2026.4.27, the parameter-free MCP tool schema issue from #60158 appears to be back: openai/gpt-5.4 rejects flux-mcp__get_flux_instance with object schema missing properties.

Error Message

  1. Observe the request fail with an OpenAI schema validation error. The issue was previously fixed by #60176, which handled truly empty MCP tool schemas returned by parameter-free MCP tools. The same MCP tool, flux-mcp__get_flux_instance, now fails again on v2026.4.27 with the same OpenAI schema validation error.

Root Cause

Severity: High, because the affected MCP tools cannot be registered or used with the OpenAI provider path.

Fix Action

Fix / Workaround

This worked after #60158 was fixed by #60176. That fix normalized truly empty MCP tool schemas {} into { type: "object", properties: {} }, so OpenAI should not reject parameter-free MCP tools with object schema missing properties.

The issue was previously fixed by #60176, which handled truly empty MCP tool schemas returned by parameter-free MCP tools. The same MCP tool, flux-mcp__get_flux_instance, now fails again on v2026.4.27 with the same OpenAI schema validation error.

PR fix notes

PR #75401: fix(mcp): normalize empty parameter-free tool schema before sending to OpenAI (#75362)

Description (problem / solution / changelog)

Fixes #75362

Summary

MCP servers may return inputSchema as { type: "object" } without a properties field, or with properties set to undefined/null. The hasTopLevelObjectSchema guard only checked "properties" in schemaRecord (key existence) without verifying the value is a real object. This caused such schemas to pass through unnormalized, resulting in OpenAI rejecting them with 400 Invalid schema for function: object schema missing properties.

Root Cause

In pi-tools-parameter-schema.ts:

  • hasTopLevelObjectSchema checked "properties" in schemaRecord — which is true even when the value is undefined
  • isTypedSchemaMissingProperties checked !("properties" in schemaRecord) — which is false when the key exists with value undefined

Result: schemas like { type: "object", properties: undefined } passed through without normalization.

Fix

  • Tighten hasTopLevelObjectSchema to require properties to be a non-null object
  • Broaden isTypedSchemaMissingProperties to catch properties keys with undefined/null/non-object values

Regression History

  • #60158: original issue report
  • #60176: original fix (normalize {}{ type: "object", properties: {} })
  • #75362: this regression (edge case with properties: undefined not caught)

Tests

Added unit tests in:

  • openai-tool-schema.test.ts: strict mode normalization for empty/undefined properties
  • pi-tools.schema.test.ts: normalizeToolParameters with properties: undefined and properties: null

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/agents/openai-tool-schema.test.ts (modified, +20/-0)
  • src/agents/pi-tools-parameter-schema.ts (modified, +15/-2)
  • src/agents/pi-tools.schema.test.ts (modified, +32/-0)

PR #75941: fix(mcp): normalize empty parameter-free tool schema before sending to OpenAI (#75362)

Description (problem / solution / changelog)

Repairs the existing branch for #75401 and fixes #75362. The narrow fix should update the shared tool-parameter schema normalizer so top-level object schemas with properties set to undefined, null, or another non-object value are normalized to { type: "object", properties: {} } before OpenAI tool registration, without rewriting valid properties or top-level allOf/union behavior. Keep focused tests for normalizeToolParameterSchema/normalizeToolParameters and any strict OpenAI compatibility coverage already added by the PR. Add or repair the CHANGELOG.md fix entry with allowed contributor credit for @SymbolStar. Before merge routing, rerun Codex /review and pnpm check:changed.

ClawSweeper 🐠 replacement reef notes:

  • Cluster: automerge-openclaw-openclaw-75401
  • Source PRs: https://github.com/openclaw/openclaw/pull/75401
  • Credit: Preserve #75401 author credit for @SymbolStar in PR body/history and changelog attribution if the changelog entry remains user-facing.; Keep #60176/@Bartok9 as historical regression context; do not remove existing credit from the earlier fix.; Do not add forbidden attribution for @codex, @openclaw, or @steipete.
  • Validation: pnpm test src/agents/pi-tools.schema.test.ts src/agents/openai-tool-schema.test.ts; pnpm check:changed
  • Repair fallback: To https://github.com/SymbolStar/openclaw.git ! [remote rejected] HEAD -> fix/mcp-empty-schema-75362 (permission denied) error: failed to push some refs to 'https://github.com/SymbolStar/openclaw.git'

fish notes: model gpt-5.5, reasoning high; reviewed against 8c5c0daac8be.

Changed files

  • CHANGELOG.md (modified, +1/-1)
  • src/agents/openai-tool-schema.test.ts (modified, +23/-0)
  • src/agents/pi-tools-parameter-schema.ts (modified, +19/-16)
  • src/agents/pi-tools.schema.test.ts (modified, +37/-0)

Code Example

2026-04-30T18:36:26.268+00:00 [model-fallback/decision] model fallback decision: decision=candidate_failed requested=openai/gpt-5.4 candidate=openai/gpt-5.4-nano reason=format next=none detail=400 Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties.
Embedded agent failed before reply: All models failed (3): openai/gpt-5.4: 400 Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties. (format) | openai/gpt-5.4-mini: 400 Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties. (format) | openai/gpt-5.4-nano: 400 Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties. (format) | LLM request failed: provider rejected the request schema or tool payload.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After upgrading to OpenClaw v2026.4.27, the parameter-free MCP tool schema issue from #60158 appears to be back: openai/gpt-5.4 rejects flux-mcp__get_flux_instance with object schema missing properties.

Steps to reproduce

  1. Run OpenClaw v2026.4.27.
  2. Configure flux-operator-mcp.
  3. Use model openai/gpt-5.4.
  4. Trigger a request path that registers or uses flux-mcp__get_flux_instance.
  5. Observe the request fail with an OpenAI schema validation error.

Expected behavior

Parameter-free MCP tool schemas should be normalized before being sent to OpenAI.

This worked after #60158 was fixed by #60176. That fix normalized truly empty MCP tool schemas {} into { type: "object", properties: {} }, so OpenAI should not reject parameter-free MCP tools with object schema missing properties.

Actual behavior

On OpenClaw v2026.4.27, the same schema validation failure is observed again for flux-mcp__get_flux_instance.

OpenClaw version

v2026.4.27

Operating system

node:24-bookworm / official OpenClaw image

Install method

Official OpenClaw image

Model

openai/gpt-5.4

Provider / routing chain

openclaw -> openai

Additional provider/model setup details

This appears to be a regression of #60158.

The issue was previously fixed by #60176, which handled truly empty MCP tool schemas returned by parameter-free MCP tools. The same MCP tool, flux-mcp__get_flux_instance, now fails again on v2026.4.27 with the same OpenAI schema validation error.

Logs, screenshots, and evidence

2026-04-30T18:36:26.268+00:00 [model-fallback/decision] model fallback decision: decision=candidate_failed requested=openai/gpt-5.4 candidate=openai/gpt-5.4-nano reason=format next=none detail=400 Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties.
Embedded agent failed before reply: All models failed (3): openai/gpt-5.4: 400 Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties. (format) | openai/gpt-5.4-mini: 400 Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties. (format) | openai/gpt-5.4-nano: 400 Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties. (format) | LLM request failed: provider rejected the request schema or tool payload.

Impact and severity

Affected: OpenClaw v2026.4.27 deployments using openai/gpt-5.4 with flux-operator-mcp and similar MCP servers exposing parameter-free tool schemas.

Severity: High, because the affected MCP tools cannot be registered or used with the OpenAI provider path.

Frequency: Observed after upgrading to v2026.4.27.

Consequence: Agent workflows depending on affected MCP tools fail.

Additional information

This looks like a regression of #60158.

#60176 fixed the previous occurrence by normalizing truly empty MCP tool schemas {} into { type: "object", properties: {} } before sending them to OpenAI. The same class of failure is now observed again on v2026.4.27.

extent analysis

TL;DR

The most likely fix is to reapply the schema normalization fix from #60176 to ensure parameter-free MCP tool schemas are properly formatted for OpenAI.

Guidance

  • Verify that the flux-mcp__get_flux_instance schema is being sent to OpenAI without the necessary normalization, causing the object schema missing properties error.
  • Check the OpenClaw v2026.4.27 code to see if the schema normalization fix from #60176 was inadvertently removed or modified.
  • Temporarily downgrade to a version of OpenClaw that includes the fix from #60176 to confirm that the issue is indeed a regression.
  • Consider applying a workaround to manually normalize the schema for flux-mcp__get_flux_instance until a permanent fix is available.

Example

No code snippet is provided as the issue is related to a specific version of OpenClaw and the fix from #60176 is not explicitly stated.

Notes

The issue appears to be a regression of a previously fixed bug, and the fix from #60176 may need to be reapplied or modified to work with OpenClaw v2026.4.27.

Recommendation

Apply a workaround to manually normalize the schema for flux-mcp__get_flux_instance until a permanent fix is available, as downgrading OpenClaw may not be feasible in production environments.

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

Parameter-free MCP tool schemas should be normalized before being sent to OpenAI.

This worked after #60158 was fixed by #60176. That fix normalized truly empty MCP tool schemas {} into { type: "object", properties: {} }, so OpenAI should not reject parameter-free MCP tools with object schema missing properties.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING