Skip to content
86% off$349 $48.86code BF2026

Docs

Sledbot docs30 pages

Codex "schema must have type 'object'" MCP error: fix

Codex rejects every request with "schema must have type 'object'". Find the MCP tool behind the 400, turn its server off, and see what Sledbot can isolate.

Updated 5 min read

On this page

You updated Codex, and now the desktop app or the CLI fails on every prompt, even "hello":

text
Invalid schema for function '_search_content': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level.

The message may also include a position such as tools[16].tools[0].parameters.

Why Codex says the schema must have type 'object'

Codex sends the model a list of tools, and each tool has a parameters schema. The API requires that schema to be an object at the top level. It fails when a schema:

  • has no type: object, or
  • starts with oneOf, anyOf, allOf, enum or not instead of describing an object.

The API validates the whole tool list in one request. One bad tool therefore returns a 400 for every prompt, including ones that would never call that tool.

Causes, most common first:

  1. An MCP server exposes a tool with an invalid schema. Tools like _search_content usually come from an MCP server, not from Codex itself. A server update, or a Codex update that now passes the tool through differently, can trigger this.
  2. A server you forgot you configured. The error names the tool and its index, not the server.
  3. Not an MCP problem. Not known. One community thread (last activity May 22, 2026) reports the Codex desktop app and CLI both failing this way after an update, and the replies asked which model was in use and pointed to GitHub issues. The thread shows no confirmed resolution, so the steps below are a way to isolate the cause, not an official fix.

Fix 1: find the bad server in Codex itself

  1. Open Terminal and run codex in a plain folder, outside any Sledbot terminal, so only Codex's own configuration applies.
  2. Disable or remove every MCP server Codex has configured. Codex's CLI documentation on developers.openai.com covers where its configuration lives.
  3. Send a short prompt. If it works, an MCP tool was the cause.
  4. Re-enable servers one at a time, sending a prompt after each. When the 400 returns, the server you just enabled has the bad tool.
  5. Leave that server off, update it, or report the schema problem to its maintainer. The tool needs a top-level object schema.

Fix 2: update and retest

If the error persists with every MCP server disabled, it is probably not an MCP problem.

  1. Update Codex to the latest version.
  2. Run the same prompt again in a new session.
  3. Check Codex's GitHub issues for the same message, since a regression in the client would affect everyone on that version.

Fix 3: isolate it in Sledbot

When an agent launches, Sledbot writes the MCP servers you have connected, plus its own sled mcp, into the agent's MCP configuration. Codex CLI is one of the agents that gets them. Catalogue servers start off, so only servers you enabled, or added as a Custom server, are involved. The error alone cannot show whether an injected server is your cause; these steps find out.

  1. Open Settings (⌘,) and choose Integrations.
  2. Under Connected, click Configure… on a server and turn off Enabled. Do this for every server, or for all but one.
  3. Start a new agent with ⌘T and choose Codex CLI. Servers are added at launch, so an agent that is already running keeps the set it started with.
  4. If the 400 is gone, re-enable servers one at a time, starting a fresh Codex agent after each, until it returns.
  5. Leave that server off, or use Remove… in its editor. Removal applies only to agents started afterwards.

Sledbot also has a label, sled.mcp=off, that opts a single launch out of MCP injection. That gives a quick test: if a launch with the label works and a normal launch fails, an injected server is involved.

Which fix applies

SymptomLikely causeFix
400 on every prompt, gone with MCP servers offA server's tool schema is invalidRe-enable one by one, keep the bad one off
Error returns after re-enabling one serverThat server's tool schema is invalidKeep it off or contact its maintainer
Disabled a server in Integrations but an open agent still errorsThe agent launched with the old server setStart a new agent with ⌘T
Error persists with every Sledbot server offServer configured in Codex itself, or not an MCP problemRun Fix 1, then Fix 2
Error appears only in the Codex desktop appApp has its own server listUse Fix 1; Sledbot does not control the app

What Sledbot can't do here

  • It only covers Codex CLI agents launched from Sledbot. The Codex desktop app, and servers configured inside Codex itself, are handled with Fix 1.
  • The error comes from the model API. Sledbot does not generate it and does not change a server's tools.
  • Sledbot does not validate a server's schemas before launch, so the first sign of a bad tool is the 400.

Checklist before you try again

  • Every MCP server is off in Codex's own configuration.
  • Every server is off under Settings > Integrations in Sledbot, or you launch with sled.mcp=off.
  • You started a new agent after changing servers.
  • Codex is on its latest version.
  • You re-enable only one server per test.

If nothing works

Contact the maintainer of the server you isolated, or OpenAI support if the error persists with all servers off. Include the exact error text, the Codex version, the model, the tool name and position from the message, and the list of MCP servers you had enabled.

text
Codex fails every request with a 400 after an update:
"Invalid schema for function '_search_content': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'not' at the top level."
Position: tools[16].tools[0].parameters
Codex version: (your version)   Model: (your model)
MCP servers enabled: (list)
Tried: disabled all servers (works / still fails), re-enabled one by one, updated Codex.
Culprit server, if found: (name)

For Sledbot questions, use the support page.

Common questions

Why does one tool break every prompt?

The API validates the full tool list on each request. A single invalid schema fails the whole request, whether or not the model would call that tool.

Is this a Sledbot bug?

Nothing shows that. The error comes from the model API, and Sledbot only passes along the MCP servers you connected. Use the label test above to check whether an injected server is involved.

Can I keep the server and disable only the tool?

Not in Sledbot, because Allowed tools is not applied at launch. In Codex itself, check whether its configuration lets you exclude a tool; otherwise ask the server's maintainer to fix the schema.

Every app.
One purchase.