Codex MCP schema translation converts array[string] tool params into string for memory_store.tags

Open 💬 1 comment Opened Mar 19, 2026 by markiejee

What version of Codex is running?

codex-cli 0.115.0

### What subscription do you have?

[fill in]

### Which model were you using?

gpt-5.4

### What platform is your computer?

macOS (Darwin), Apple Silicon / x86_64 as applicable

### What issue are you seeing?

Codex appears to mis-convert an MCP tool parameter that is advertised as array[string] into a plain string in the exposed
callable tool schema.

In my case, an MCP server exposes:

  • memory_store.tags: array[string]
  • memory_update.tags: array[string]

But the Codex tool wrapper exposed to the assistant runtime shows:

  • memory_store(... tags?: string ...)
  • memory_update(... tags?: string ...)

As a result, the first tool call sends tags as a string, and the MCP server correctly rejects it with a validation error
because the backend expects list[str].

### What steps can reproduce the bug?

  1. Register an MCP server whose tools/list response includes a tool with a parameter like:
  • "tags": { "type": "array", "items": { "type": "string" } }
  1. Start Codex and let it use that MCP tool.
  2. Ask Codex to call the tool with tags.
  3. Observe that Codex’s first call sends tags as a string instead of an array.

In my concrete case:

  • MCP server: AI Memory Vault
  • Tool: memory_store
  • Correct MCP schema: tags is array[string]
  • Exposed Codex wrapper schema: tags?: string

### What is the expected behavior?

Codex should preserve the MCP schema exactly:

  • array[string] in MCP tools/list
  • list[str] / array-of-string in the exposed tool wrapper

The first call should send:
```json
"tags": ["aimemvault", "mcp"]

not:

"tags": "aimemvault,mcp"

### Additional information

I verified that the MCP server itself is correct.

Server-side evidence:

  • The MCP tools/list response advertises tags as array[string].
  • The backend validator expects list[str].
  • The server correctly rejects a plain string with a validation error.

This appears to be a Codex MCP bridge/schema translation bug, not a bug in the MCP server.

The issue likely affects multiple tools, not just this one, wherever Codex maps array[string] parameters incorrectly to
string.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗