openclaw - ✅(Solved) Fix [Bug]: openai/gpt-5.4 rejects parameter-free MCP tool schemas in 2026.4.2 [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#60158Fetched 2026-04-08 02:35:35
View on GitHub
Comments
0
Participants
1
Timeline
10
Reactions
0
Participants
Timeline (top)
referenced ×5labeled ×2closed ×1cross-referenced ×1

On OpenClaw 2026.4.2 with model openai/gpt-5.4, flux-operator-mcp is rejected with HTTP 400: Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties.

Error Message

2026-04-03T07:35:49.377+00:00 [agent/embedded] embedded run agent end: runId=3973d6c6-4f3c-421e-9f6b-26d4d262b222 isError=true model=gpt-5.4 provider=openai error=HTTP 400: Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties. rawError=400 Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties.

Root Cause

On OpenClaw 2026.4.2 with model openai/gpt-5.4, flux-operator-mcp is rejected with HTTP 400: Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties.

Fix Action

Fixed

PR fix notes

PR #60176: fix(tools): normalize truly empty MCP tool schemas for OpenAI

Description (problem / solution / changelog)

Summary

Fixes #60158

MCP tools with parameter-free schemas may return truly empty objects {} without a type field. The existing normalization handled { type: "object" }{ type: "object", properties: {} } but missed the truly empty case.

Problem

OpenAI gpt-5.4 rejects tool schemas without type: "object" and properties, causing HTTP 400 errors:

Invalid schema for function 'flux-mcp__get_flux_instance':
In context=(), object schema missing properties.

This was happening for MCP tools like flux-operator-mcp that expose parameter-free tool schemas.

Root Cause

The normalizeToolParameterSchema function in pi-tools.schema.ts handled three cases:

  1. Schemas with both type and properties → pass through
  2. Schemas with no type but with properties or required → add type: "object"
  3. Schemas with type but no properties → add properties: {}

But it did not handle truly empty schemas {} that have neither type nor properties. These fell through to the final return schema without normalization.

Fix

Added a condition before the final pass-through to catch empty schemas (no type, no properties, no unions) and normalize them to { type: "object", properties: {} }.

Testing

  • Added test case: "normalizes truly empty schemas to type:object with properties:{} (MCP parameter-free tools)"
  • All existing tests pass

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/agents/pi-tools.schema.test.ts (modified, +30/-0)
  • src/agents/pi-tools.schema.ts (modified, +6/-0)

Code Example

2026-04-03T07:35:49.377+00:00 [agent/embedded] embedded run agent end: runId=3973d6c6-4f3c-421e-9f6b-26d4d262b222 isError=true model=gpt-5.4 provider=openai error=HTTP 400: Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties. rawError=400 Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On OpenClaw 2026.4.2 with model openai/gpt-5.4, flux-operator-mcp is rejected with HTTP 400: Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties.

Steps to reproduce

  1. Run OpenClaw 2026.4.2 with model openai/gpt-5.4.
  2. Configure flux-operator-mcp.
  3. Trigger a request path that registers or uses flux-mcp__get_flux_instance.
  4. Observe the request fail with HTTP 400: Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties.

Expected behavior

The MCP tool schema should be accepted on the OpenAI Responses path. Issue #58246 was closed by #58299, and the release notes state that raw bundled MCP tool schemas were normalized so bare-object MCP tools would no longer be rejected during OpenAI tool registration.

Actual behavior

The request fails on OpenClaw 2026.4.2 with model openai/gpt-5.4, returning HTTP 400: Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties.

OpenClaw version

2026.4.2

Operating system

node:24-bookworm (default)

Install method

Official OpenClaw image

Model

openai/gpt-5.4

Provider / routing chain

openclaw -> openai

Additional provider/model setup details

No response

Logs, screenshots, and evidence

2026-04-03T07:35:49.377+00:00 [agent/embedded] embedded run agent end: runId=3973d6c6-4f3c-421e-9f6b-26d4d262b222 isError=true model=gpt-5.4 provider=openai error=HTTP 400: Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties. rawError=400 Invalid schema for function 'flux-mcp__get_flux_instance': In context=(), object schema missing properties.

Impact and severity

Affected: OpenClaw 2026.4.2 deployments using model openai/gpt-5.4 with flux-operator-mcp and similar MCP servers exposing parameter-free tool schemas Severity: High (blocks agent operation with the affected MCP servers)

Additional information

This appears similar to #58246, but the observed reproduction is on openai/gpt-5.4 rather than openai-codex/gpt-5.4.

extent analysis

TL;DR

The most likely fix is to update the flux-mcp__get_flux_instance function schema to include the missing properties.

Guidance

  • Review the flux-mcp__get_flux_instance function schema and identify the missing properties that are causing the HTTP 400 error.
  • Verify that the schema is correctly formatted and matches the expected structure for the openai/gpt-5.4 model.
  • Check the release notes for any specific instructions on updating the schema for the openai/gpt-5.4 model, as the issue may be related to the normalization of raw bundled MCP tool schemas.
  • Test the updated schema with a sample request to ensure that it is accepted by the OpenAI Responses path.

Example

No code snippet is provided as the issue does not include sufficient information about the schema or the expected structure.

Notes

The issue may be related to the normalization of raw bundled MCP tool schemas, which was addressed in issue #58246. However, the observed reproduction is on a different model (openai/gpt-5.4 instead of openai-codex/gpt-5.4), so the fix may not be directly applicable.

Recommendation

Apply a workaround by updating the flux-mcp__get_flux_instance function schema to include the missing properties, as this is the most likely cause of the error.

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

The MCP tool schema should be accepted on the OpenAI Responses path. Issue #58246 was closed by #58299, and the release notes state that raw bundled MCP tool schemas were normalized so bare-object MCP tools would no longer be rejected during OpenAI tool registration.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING