Skip to content

Notion MCP server tool create-a-database not supported in codex #4019

Closed

Description

@lionelchg

What version of Codex is running?

0.39.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

Add the notion MCP server inside CODEX_HOME/config.toml:

# IMPORTANT: the top-level key is `mcp_servers` rather than `mcpServers`.
[mcp_servers.notion]
command = "npx"
args = ["-y", "@notionhq/notion-mcp-server"]
env = { "NOTION_TOKEN" = "<your-notion-token>" }

To get your token follow the steps in https://github.com/makenotion/notion-mcp-server. Then

  • tail the logs of codex tail -F ~/.codex/log/codex-tui.log
  • Ask codex to create an empty Notion page with a empty database

What is the expected behavior?

No error in the logs and a working create a database Notion MCP tool.

What do you see instead?

When tailing the logs of codex tail -F ~/.codex/log/codex-tui.log at every call you get the following error:

2025-09-21T22:12:53.843020Z ERROR Failed to convert "notion__API-create-a-database" MCP tool to OpenAI tool: Error("invalid type: map, expected a boolean", line: 0, column: 0)

See screenshot for example:

Image

When trying to ask codex to create a database it then fails. All other Notion tools work (summarize, create a page etc...)

Additional information

No response

Activity

  1. added
    bug
    on Sep 21, 2025
  2. lionelchg commented on Sep 21, 2025

    @lionelchg
    ContributorAuthor

    After some investigation I believe that the schema of that particular tool create-a-database (https://github.com/makenotion/notion-mcp-server/blob/main/scripts/notion-openapi.json) is not handled by codex:

    • In the Notion OpenAPI spec (/v1/databases → POST → requestBody), the properties field in the payload is declared as:
        "properties": {
          "type": "object",
          "description": "...",
          "additionalProperties": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "title": { ... }
                },
                "additionalProperties": false,
                "required": ["title"]
              }
            ]
          }
        }
    • That additionalProperties value is itself a schema object (wrapped in a oneOf) so callers can define arbitrary database properties. Our converter doesn’t understand that richer form; it only accepts a bare boolean in codex-rs/core/src/openai_tools.rs -> additional_properties. As soon as serde tries to materialize the schema into JsonSchema::Object, it encounters the object and throws the “expected a boolean” error.

    To solve this issue I guess we need to change the schema of the additional_properties field

  3. added
    mcp
    on Nov 11, 2025
  4. gpeal commented on Nov 11, 2025

    @gpeal
    Contributor

    I just tried this on the latest release and things seem to be working fine now! There have been a lot of MCP changes since this was originally filed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmcp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions