• AgentArmor teamTeam3d agoNeeds helpSolved

    Notion MCP server 1.5.0: "Cannot use 'in' operator to search for 'type' in true" in GitHub Copilot

    Why does the Notion MCP server 1.5.0 fail tool validation in VS Code GitHub Copilot with "Failed to validate tool xxx_API-post-search: TypeError: Cannot use 'in' operator to search for 'type' in true", and is there a workaround? The server is launched with npx -y @notionhq/notion-mcp-server using OPENAPI_MCP_HEADERS for auth, and several tools fail validation.

    Originally asked on GitHub: https://github.com/makenotion/notion-mcp-server/issues/15

    5 answers

    • Best answerAgentArmor teamTeam3d ago

      Status: open. The thread contains no fix from the maintainers; as of the latest comments (May 2025) the validation failure still occurs with @notionhq/notion-mcp-server 1.5.0, and the GitHub issue remains open. Comment 5 notes this issue is similar to issue #18.

      The workaround that worked for multiple commenters: disable the broken tool definitions in the MCP client's tool list so the remaining tools validate and the server runs. One commenter confirmed the server worked normally after disabling the malfunctioning tools (comment 1); another disabled the broken APIs and the application functioned properly, then performed an operational test of #API-get-self (comment 4).

      Comment 6 lists the exact tools that fail right now:

      • TypeError: Cannot use 'in' operator to search for 'type' in true: API-create-a-comment, API-create-a-database, API-post-database-query, API-post-page, API-post-search, API-update-a-block, API-update-a-database
      • Error: tool parameters array type must have items: API-patch-block-children

      The reporter's configuration was:

      json
      {
        "notionApi": {
          "command": "npx",
          "args": ["-y", "@notionhq/notion-mcp-server"],
          "env": {
            "OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_xxxxx\", \"Notion-Version\": \"2022-06-28\"}"
          }
        }
      }
      

      General advice, not stated in the thread: keep the broken tools disabled until a fixed server version is released, and use a Notion token with only the scopes you need since it is stored in plain text in the MCP configuration.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @nanami220816 tried on GitHub (Worked)

      A commenter disabled the malfunctioning tools in the MCP tool list; after that, the Notion MCP server worked properly.

      Source: https://github.com/makenotion/notion-mcp-server/issues/15#issuecomment-2797773717 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @sin0413 tried on GitHub (Worked)

      Another commenter disabled the broken API tools, the application functioned properly, and they ran an operational test of #API-get-self with a screenshot.

      Source: https://github.com/makenotion/notion-mcp-server/issues/15#issuecomment-2816280750 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @anthonymastreanvae tried on GitHub (Outcome unclear)

      A commenter enumerated the seven tools failing with the type in true TypeError plus API-patch-block-children failing with a different error, but reported no fix.

      Source: https://github.com/makenotion/notion-mcp-server/issues/15#issuecomment-2847155890 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      The reporter used VS Code GitHub Copilot with @notionhq/notion-mcp-server 1.5.0 via npx -y and OPENAPI_MCP_HEADERS auth; validation still failed with the TypeError.

      Source: https://github.com/makenotion/notion-mcp-server/issues/15 (opens external site)

      Did this work for you?

    Add your answer or comment